mod_expires – This module controls the setting of the Expires HTTP header in server responses. The expiration date can set to be relative to either the time the source file was last modified, or to the time of the client access.

The Expires HTTP header is an instruction to the client about the document’s validity and persistence. If cached, the document may be fetched from the cache rather than from the source until this time has passed. After that, the cache copy is considered “expired” and invalid, and a new copy must be obtained from the source.

mod_expires is included in most default installs.

Check wheter LoadModule expires_module modules/mod_expires.so is enabled or not in httpd.conf, if its not then uncomment it removing the # prefix.

And then add following code into your httpd.conf configuration file -

<IfModule mod_expires.c>
# enable expirations
ExpiresActive on
# expire images after a month in the client’s cache
ExpiresByType image/jpg “access plus 60 days”
ExpiresByType image/png “access plus 60 days”
ExpiresByType image/gif “access plus 60 days”
ExpiresByType image/jpeg “access plus 60 days”
# css may change sometimes
ExpiresByType text/css “access plus 1 days”

# special MIME type for icons
ExpiresByType image/x-icon “access plus 360 days”
</IfModule>

Restart apache server.

Resource links -

http://blog.cherouvim.com/mod_expires-and-cache-killers/
http://httpd.apache.org/docs/1.3/mod/mod_expires.html
http://www.david-guerrero.com/papers/squid/squid.htm
http://linuxreviews.org/webdesign/602_Apache_mod_expire/
http://jeremy.zawodny.com/blog/archives/009272.html

Post to Twitter Post to Yahoo Buzz Post to Delicious Post to Digg Post to Reddit Post to StumbleUpon

Share or Bookmark This Post With :

One Comment
Polprav Posted On October 16th, 2009

Hello from Russia!
Can I quote a post in your blog with the link to you?

Leave a Reply

Subscribe to RSS Feeds Follow me on Twitter Add to Favourite
 
Sponsors
 
Tags
 
Network [+]
 
© Copyright 2009 - 2011 TechiePark.com. All Rights Reserved | Powered by WordPress
This work is licensed under a Creative Commons Attribution 3.0 Unported License
Php5 powered    Mysql powered    Apache powered   Best viewed with  Spread Firefox Affiliate Button