0

Given below is the code in my .htaccess file. On checking PageSpeed Insights, it still tells me to Leverage browser caching only for my png and jpg files. Could someone point out what could be wrong with the code? Would appreciate help! (The site is using a wordpress theme)

<IfModule mod_headers.c>  
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|svg)$">  
Header set Expires "Wed, 15 Apr 2020 20:00:00 GMT"  
Header set Cache-Control "public"  
</FilesMatch>  
</IfModule>

1 Answers1

0

Assuming it is working correctly for the other extensions, my best guess is that perhaps your .jpg and .png files have uppercase letters in their extension (e.g. .JPG or .PNG). If that's the case try making your FilesMatch regular expression be case insensitive (see How to make this .htaccess rule case insensitive?).

Community
  • 1
  • 1
sa289
  • 700
  • 3
  • 12