Mobile app version of vmapp.org
Login or Join
Martha676

: 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

@Martha676

Posted in: #Expires #Headers #Htaccess

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Martha676

1 Comments

Sorted by latest first Latest Oldest Best

 

@Rivera981

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme