Posted By

iloveitaly on 10/15/10


Tagged

apache cache


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

randompage


Cache Images Apache Server


 / Published in: Apache
 

  1. # 1 YEAR
  2. <FilesMatch "\.(ico|pdf|flv)$">
  3. Header set Cache-Control "max-age=29030400, public"
  4. </FilesMatch>
  5.  
  6. # 1 WEEK
  7. <FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
  8. Header set Cache-Control "max-age=604800, public"
  9. </FilesMatch>
  10.  
  11. # 2 DAYS
  12. <FilesMatch "\.(xml|txt|css|js)$">
  13. Header set Cache-Control "max-age=172800, proxy-revalidate"
  14. </FilesMatch>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: randompage on December 27, 2010

the codes is setting the http header responses.

You need to login to post a comment.