Posted By

iTony on 09/24/08


Tagged

apache Expiration


Versions (?)

set expire for files in apache


 / Published in: PHP
 

URL: http://www.thewebsqueeze.com/articles/yslow-going-from-f-to-a.html/2/

  1. # Set far-future expiry for images, css, and js
  2. # Remember that you MUST change the filename whenever you update these items!
  3. <ifmodule mod_expires.c>
  4. <filesmatch "\.(jpg|jpeg|png|gif|js|css)$">
  5. ExpiresActive on
  6. ExpiresDefault "access plus 10 years"
  7. </filesmatch>
  8. <filesmatch "\.(ico)$">
  9. ExpiresActive on
  10. ExpiresDefault "access plus 2 months"
  11. </filesmatch>
  12. </ifmodule>

Report this snippet  

You need to login to post a comment.