Support » Plugin: Breeze - WordPress Cache Plugin » Breeze sets a default 30 day browser cache

  • Kristian


    Breeze (v1.0.8) sets a dangerous default browser cache max-age/expires value of 30 days, which applies to all web pages (text/html) for visitors who aren’t logged in to WordPress.

    The Browser Cache option says “Enable this to add expires headers to static files”; when enabled, it adds mod_expires directives to the .htaccess file, instructing browsers to cache css/js/image resources for 7 days. But it also adds “ExpiresDefault A2592000” to .htaccess, which sets Cache-Control and Expires headers to 30 days for all other content types (including text/html).

    I got caught out by this because I was logged in as admin while testing everything, so WordPress was overriding the Cache-Control and Expires headers.

    Now returning visitors won’t see changes to pages for 30 days (unless they manually force refresh on every page) and WordPress/plugin updates can’t be done during that time, because cached css/js/image resources expire long before the page markup itself will be re-requested.

    This is a NASTY BUG!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Kristian


    #Expires headers configuration added by BREEZE WP CACHE plugin
    <IfModule mod_expires.c>
       ExpiresActive On
       ExpiresDefault A2592000
       ExpiresByType application/javascript "access plus 7 days"
       ExpiresByType text/javascript "access plus 7 days"
       ExpiresByType text/css "access plus 7 days"
       ExpiresByType image/jpeg "access plus 7 days"
       ExpiresByType image/png "access plus 7 days"
       ExpiresByType image/gif "access plus 7 days"
       ExpiresByType image/ico "access plus 7 days"
       ExpiresByType image/x-icon "access plus 7 days"
       ExpiresByType image/svg+xml "access plus 7 days"
       ExpiresByType image/bmp "access plus 7 days"
    #End of expires headers configuration

    Weirdly, the problematic directive is the only one written in seconds (short form) A2592000, instead of “access plus 30 days” like the others. Maybe a rogue copy & paste oversight?

    That default is being set in /inc/breeze-configuration.php for function add expires header to .htaccess.

    Would someone be kind enough to advise on best practice here… what should the .htaccess file look like? do we have to edit the breeze-configuration.php or has this been fixed in an update?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Breeze sets a default 30 day browser cache’ is closed to new replies.