Search code examples
browser-cachestatic-files

Static files fully from cache?


Check this picture: http://i54.tinypic.com/2gy7mrt.png

How to achieve that for my static files? I mean so the browser even wouldn't make a request to server, just take the file from cache. On what static files should this method be used?


Solution

  • Assuming your server is Apache, have a look at mod_expire.

    The static files I have configured to expire "later" are text/css, text/javascript, application/javascript and image/*.