Answers for "caching static html css js images"

0

caching static html css js images

# cache images/pdf docs for 1 week
<FilesMatch "\.(ico|pdf|jpg|jpeg|png|gif)$">
  Header set Cache-Control "max-age=604800, public, must-revalidate"
  Header unset Last-Modified
</FilesMatch>

# cache html/htm/xml/txt diles for 2 days
<FilesMatch "\.(css|js)$">
  Header set Cache-Control "max-age=172800, must-revalidate"
</FilesMatch>
Posted by: Guest on June-04-2021

Browse Popular Code Answers by Language