Chinou
Chinou

Reputation: 481

how to specify cache validator for Google fonts

GTMetrix Result

Specify a cache validator A (92) - SERVER HIGH What's this mean? The following resources are missing a cache validator. Resources that do not specify a cache validator cannot be refreshed efficiently. Specify a Last-Modified or ETag header to enable cache validation for the following resources:

http://fonts.googleapis.com/css?family=Lato%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C700%2C700italic%2C900%2C900italic&ver=4.6.1 http://fonts.googleapis.com/css?family=Lato%3A100%2C300%2C400%2C600%2C700%2C900%7COpen+Sans%3A700%2C300%2C600%2C400%7CRaleway%3A900%7CPlayfair+Display%7C&ver=4.6.1

Upvotes: 3

Views: 1995

Answers (1)

Robba
Robba

Reputation: 8314

The check you've performed is clearly complaining about there not being either a Last-Modified or an ETag header on the resources being served by the fonts.googleapis.com site.

Unfortunately there isn't much you can do about this as you (I assume) are not in charge of those servers. If you really want to get rid of this warning all you can do is get the fonts from the Google servers and serve them up from you own server. Then you can setup the caching headers any way you want.

Note though, that this is really not much of an issue. The only thing that happens when these headers are missing is that caching may not work according to the way your validator is expecting. There is nothing really that the end-user will notice from this.

Upvotes: 3

Related Questions