: How do I expire by type in .htaccess for remote loaded Google fonts? Is it possible to set expire by type for remote fonts or Google analytics? I'm getting this report from GTMetrix and everything
Is it possible to set expire by type for remote fonts or Google analytics? I'm getting this report from GTMetrix and everything I've tried isn't working. Suggestions?
There are 4 static components without a far-future expiration date. fonts.googleapis.com/css?family=Open+Sans:300 http://fonts.googleapis.com/css?family=Roboto&subset=latin,latin-ext www.google-analytics.com/ga.js http://www.google-analytics.com/analytics.js
All of my other expires are working fine. But apparently this type of thing isn't right?
ExpiresByType application/x-font-woff "access 1 year"
ExpiresByType application/font-woff "access 1 year"
What should I do?
More posts by @Martha676
1 Comments
Sorted by latest first Latest Oldest Best
No, you can't change the expiry headers for remote files that aren't under your control.
The only way you could would be to host them on your own server - however you then remove the advantage of these files being hosted on powerful CDNs and the font files are probably already stored in other user's browser caches.
There are work-around methods to use PHP classes to cache remote content by URL that you might want to look into.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.