Click here to Skip to main content
15,886,422 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
CSS
After running Google page speed online , it remarks that I should be: Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.

And it lists a lot of plain images , my javascript files and the style sheets.

How can I set this expiry date for these static files ? I thought this was done automatically by the browser ?



i'm using APACHE 2.2.8
Posted
Comments
Sergey Alexandrovich Kryukov 6-Nov-13 10:07am    
You idea about "done automatically" looks weird to me. How a browser could possibly know expiration date if you don't tell it explicitly? And how would you make different dates for different resources?
—SA

1 solution

The data "from local disk" you mention is called Web cache. Please see: http://en.wikipedia.org/wiki/Web_cache[^].

First of all, I would recommend this complete tutorial on cache control: http://www.mnot.net/cache_docs/[^].

Some more:
http://palizine.plynt.com/issues/2008Jul/cache-control-attributes/[^],
http://www.web-caching.com/[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900