Comments on Make Browsers Cache Static Files With mod_expires On Apache2 (Debian Squeeze)

Make Browsers Cache Static Files With mod_expires On Apache2 (Debian Squeeze) This tutorial explains how you can configure Apache2 to set the Expires HTTP header and the max-age directive of the Cache-Control HTTP header of static files (such as images, CSS and Javascript files) to a date in the future so that these files will be cached by your visitors' browsers. This saves bandwidth and makes your web site appear faster (if a user visits your site for a second time, static files will be fetched from the browser cache). This tutorial was written for Debian Squeeze.

8 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: mbsouth

Good and clear tutorial! Be carefull with CSS and JS files. Some CMS systems create these files on demand.

Thx, mbsouth

By: Anonymous

remember if placing the code into htaccess to remove the [...] from code

By: Peter

a very nice contribution. Super says.

Peter

 

 

By: Diwakar

After running the command a2enmod expires it started working.

 

Thanks

By: dsddsf

delete form wp_users

By: brody

what if my file is called 000-default.conf, should I place it in there?

By: Gaston

One of the very few articles on the subject that explains concepts with enought detail.

Thank you very much!

By: Daniel

The most useful guide I've met after a long research on the subject.