When I run Google PageSpeed Insights I get the following optimization suggestion.
.htaccess should be simple enough so I included the following lines inside of my existing
<IfModule mod_headers.c> <filesMatch "https://www.google-analytics.com/analytics.js"> Header set Cache-Control "max-age=7200, public" </filesMatch> <filesMatch "https://www.googletagmanager.com/gtag/js?id=UA-00000000-0"> Header set Cache-Control "max-age=900, public" </filesMatch> </IfModule>
I uploaded the
.htaccess file, tested it and got the same error. Even though Google recommends using
Cache-Control that doesn't solve the problem.
When that didn't work I tried
ExpiresByType but it didn't solve them problem either.
Is there a way to use an
.htaccess file to instruct browsers to cache these files or is that not possible?