How can I set Cache TTL for woff and woff2 font files with htaccess?


My WordPress site htaccess file currently has these entries to set cache expiry for woff and woff2 font files:

<IfModule mod_expires.c>
  # Content type
    AddType application/font-woff   .woff
    AddType application/font-woff2  .woff2
    ExpiresActive on
  # Web fonts
    ExpiresByType application/font-woff   "access plus 1 year"
    ExpiresByType application/font-woff2  "access plus 1 year"

But I’m still getting suggestions to set cache TTL for these files in speed testing tools. Here’s one example with a cache efficiency problem:

enter image description here

Is there anything wrong with my htaccess file? How can I solve this?

akarim 8 months 2020-12-11T07:10:25-05:00 0 Answers 8 views 0

Leave an answer