• Resolved arzack

    (@arzack)


    Hi,

    I am working with the woocommerce and storefront theme
    Both GTmetrix and google pagespeed detect that these two fonts:

    /wp-content/themes/storefront/assets/fonts/fa-solid-900.woff2
    /wp-content/themes/storefront/assets/fonts/fa-brands-400.woff2

    have no effective cache policy (TTL = none)
    from htaccess i implemented this directive:

    <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault “access plus 1 month”
    # cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
    ExpiresByType text/cache-manifest “access plus 0 seconds”
    # Your document html
    ExpiresByType text/html “access plus 0 seconds”
    # Data
    ExpiresByType text/xml “access plus 0 seconds”
    ExpiresByType application/xml “access plus 0 seconds”
    ExpiresByType application/json “access plus 0 seconds”
    # Feed
    ExpiresByType application/rss+xml “access plus 1 hour”
    ExpiresByType application/atom+xml “access plus 1 hour”
    # Favicon (cannot be renamed)
    ExpiresByType image/x-icon “access plus 1 week”
    # Media: images, video, audio
    ExpiresByType image/gif “access plus 4 months”
    ExpiresByType image/png “access plus 4 months”
    ExpiresByType image/jpeg “access plus 4 months”
    ExpiresByType image/webp “access plus 4 months”
    ExpiresByType video/ogg “access plus 4 months”
    ExpiresByType audio/ogg “access plus 4 months”
    ExpiresByType video/mp4 “access plus 4 months”
    ExpiresByType video/webm “access plus 4 months”
    # HTC files (css3pie)
    ExpiresByType text/x-component “access plus 1 month”
    # Webfonts
    ExpiresByType font/ttf “access plus 4 months”
    ExpiresByType font/otf “access plus 4 months”
    ExpiresByType font/woff “access plus 4 months”
    ExpiresByType font/woff2 “access plus 4 months”
    ExpiresByType image/svg+xml “access plus 1 month”
    ExpiresByType application/vnd.ms-fontobject “access plus 1 month”
    # CSS and JavaScript
    ExpiresByType text/css “access plus 1 year”
    ExpiresByType application/javascript “access plus 1 year”
    </IfModule>
    

    but these 2 fonts are still not cached, what can be the solution to this problem?

    • This topic was modified 4 years, 1 month ago by arzack.
    • This topic was modified 4 years, 1 month ago by arzack.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @arzack,

    Thanks for reaching out to us!

    Could you please share the URL of your site or a link to the GTMetrix/PageSpeed Insights reports so we can take a further look?

    In the meantime, I think the issue may be that your server does not have the woff2 mime-type enabled. .woff2 is the font format for the two fonts that are not being cached. You should be able to enable this mime-type by adding the following code to your .htaccess file:

    # MIME Mappings
    AddType font/woff .woff
    AddType font/woff2 .woff2
    Thread Starter arzack

    (@arzack)

    Fixed, it was a problem with the htaccess file in the route …

    Great, thanks for the update @arzack! Please let us know if you have any further questions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘font storefront no cache browser’ is closed to new replies.