Forum Moderators: phranque

Message Too Old, No Replies

Cache Rule For Woff2 Font?

         

Jennnnn

5:46 pm on Sep 7, 2019 (gmt 0)

5+ Year Member Top Contributors Of The Month



I recently added cache control rules to my .htaccess file. Everything works except the rule for my woff2 font.

PSI lists “none” for cache TTL in the ”serve static assets with an efficient cache policy” dropdown.

This is my rule:

ExpiresByType application/x-font-woff2 “access 1 month”

How can I fix this so my font will cache? Thanks!

not2easy

6:19 pm on Sep 7, 2019 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Are you hosting the fonts you use? If they are not locally hosted you will see errors on cache settings. Google fonts are frequently (api) requested in the headers of your pages. Google offers instructions on hosting and cache settings for their fonts.