6

this is my htaccess cache-control policy:

<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico)$"> Header set Cache-Control "max-age=31536000" </FilesMatch>

<FilesMatch "\.(js|css|pdf|swf)$"> Header set Cache-Control "max-age=31536000" </FilesMatch>

<FilesMatch "\.(html|htm|txt)$"> Header set Cache-Control "max-age=600" </FilesMatch>

<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$"> Header unset Cache-Control </FilesMatch> 

<FilesMatch "\.(eot|otf|ttf|woff|woff2|svg)$"> Header set Cache-Control "max-age=31536000" </FilesMatch>

Now, for webp images is it possible to set a cache-control directive?

Thanks a lot

umbbberto
  • 61
  • 7

1 Answers1

0

I usually set this way and it works for me:

<IfModule mod_expires.c>  
ExpiresActive On  
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|form|webp)$">  
ExpiresDefault "access plus 1 year"  
</FilesMatch>  
</IfModule>  
Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Tin Paiva
  • 1
  • 1