• Resolved jodzeee

    (@jodzeee)


    I’m curious why the recommendations in this KB are different than what SG Optimizer adds.
    https://www.siteground.com/kb/how-to-leverage-browser-caching/

    This is what’s added to .htaccess when I tick the box in the plugin.

    # Leverage Browser Caching by SG-Optimizer
    <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault “access plus 6 months”
    # CSS
    ExpiresByType text/css “access plus 1 year”
    # HTML components (HTCs)
    ExpiresByType text/x-component “access plus 0 seconds”
    # HTML
    ExpiresByType text/html “access plus 0 seconds”
    # JavaScript
    ExpiresByType application/javascript “access plus 1 year”
    ExpiresByType application/x-javascript “access plus 1 year”
    # Manifest files
    ExpiresByType application/x-web-app-manifest+json “access plus 0 seconds”
    ExpiresByType text/cache-manifest “access plus 0 seconds”
    # Media
    ExpiresByType audio/ogg “access plus 1 year”
    ExpiresByType image/gif “access plus 1 year”
    ExpiresByType image/jpg “access plus 1 year”
    ExpiresByType image/jpeg “access plus 1 year”
    ExpiresByType image/png “access plus 1 year”
    ExpiresByType image/svg “access plus 1 year”
    ExpiresByType image/svg+xml “access plus 1 year”
    ExpiresByType video/mp4 “access plus 1 year”
    ExpiresByType video/ogg “access plus 1 year”
    ExpiresByType video/webm “access plus 1 year”
    ExpiresByType image/x-icon “access plus 1 year”
    ExpiresByType application/pdf “access plus 1 year”
    ExpiresByType application/x-shockwave-flash “access plus 1 year”
    # XML
    ExpiresByType text/xml “access plus 0 seconds”
    ExpiresByType application/xml “access plus 0 seconds”
    # Web feeds
    ExpiresByType application/atom+xml “access plus 1 hour”
    ExpiresByType application/rss+xml “access plus 1 hour”
    # Web fonts
    ExpiresByType application/font-woff “access plus 1 year”
    ExpiresByType application/font-woff2 “access plus 1 year”
    ExpiresByType application/vnd.ms-fontobject “access plus 1 year”
    ExpiresByType application/x-font-ttf “access plus 1 year”
    ExpiresByType font/opentype “access plus 1 year”
    </IfModule>
    # END LBC

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Thanks for reporting this, I will update the article shortly.

    Thread Starter jodzeee

    (@jodzeee)

    So why the change? One year seems like a long time.

    I am try to add Expires Headers to a Woocommerce site. When I tick Browser-specific caching there are no additions to .htaaccess ?

    I don’t think the config should be the same for WooCommerce as a vanilla WordPress do you have any recommendations?

    I’d add the code to .htaccess but uncertain how this interacts with SG Optimser

    Thanks

    Ian

    @ianpurves I am having the same issue, where i tick caching but nothing is added to my .htaccess file.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Browser Caching / Expire Headers’ is closed to new replies.