How do I 'leverage browser caching' for Google fonts? -


i tested site via pingdom , got this:

enter image description here

i searched couldn't find solution this. know how can 14 100?

since cannot control googles headers (including expiration headers), can see 1 solution – download these 2 stylesheets , fonts own hosting server, change html tags accordingly.

then, can set expiration headers (what pingdom called 'lifetime') wish.

for example, open first link:

/* latin */ @font-face {   font-family: 'montserrat';   font-style: normal;   font-weight: 400;   src: local('montserrat-regular'), url(http://fonts.gstatic.com/s/montserrat/v6/zhcz-_wihjsqc0ohj9tcyazydmxhdd8saj6oajtfsbi.woff2) format('woff2');   unicode-range: u+0000-00ff, u+0131, u+0152-0153, u+02c6, u+02da, u+02dc, u+2000-206f, u+2074, u+20ac, u+2212, u+2215, u+e0ff, u+effd, u+f000; } 

download .woff2 file , save anywhere on webserver. copy & paste piece of stylesheet of own css files or html. change link fonts.gstatic.com new url.

google serves these fonts expiration time of 1 day. set 30 days now.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -