• Resolved Craig

    (@craigrkirkby)


    Hi

    I’ve just discovered this plugin after being burnt with a few other cache plugins. I am enjoying the clear explanations and it certainly seems to be doing the job.

    I have previously added the following expires header code to my .htaccess file:

    <IfModule mod_expires.c>
    
    # Enable expirations
    ExpiresActive On
    
    # Default directive
    ExpiresDefault "access plus 1 week"
    
    # My favicon
    ExpiresByType image/x-icon "access plus 1 month"
    
    # Images
    ExpiresByType image/gif "access plus 1 week"
    ExpiresByType image/png "access plus 1 week"
    ExpiresByType image/jpg "access plus 1 week"
    ExpiresByType image/jpeg "access plus 1 week"
    
    # CSS
    ExpiresByType text/css "access 1 week"
    
    # Javascript
    ExpiresByType application/javascript "access plus 1 month"
    
    </IfModule>

    Should I still keep it or can I remove it now that ZenCache deals with Expiration Time? I.e. does Expiration Time do the same job as the expires header?

    Thank you.

    https://www.ads-software.com/plugins/zencache/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Raam Dev

    (@raamdev)

    @craigrkirkby Glad to hear you’re enjoying ZenCache. ??

    Regarding your .htaccess code: I recommend leaving that in there, if it was working for you. While ZenCache does handle automatic expiration of cache files (and intelligently clears the necessary cache files when various events occur to ensure your site stays fresh), that code in your .htaccess file is actually referring to browser caching, i.e., how long a visitor’s browser should cache various static resources–that’s totally separate from the server-side page caching that ZenCache does (caching the output of dynamic content generated by WordPress to prevent WordPress from running unnecessary database queries).

    We actually have a feature request open to add support for automatically inserting similar rules into your .htaccess file, so that you can enable browser caching directly from within ZenCache. So, for now, I suggest keeping the rules you mentioned above as it will certainly help speed things up for your visitors.

    Plugin Author Raam Dev

    (@raamdev)

    And to answer your question in the title, “Is the Expiration Time function the same as an Expires Header?”: No, it’s not the same. The Expiration Time inside ZenCache (ZenCache → Plugin Options → Directory / Expiration Time) is referring to the automatic expiration time of server-side cache files. The Apache Expires module in your .htaccess file is referring to the expiration time of static content cached by a visitors browser–i.e., how long should a visitors browser be allowed to keep a copy of your static resources in their browser cache, so that the next time they visit your site they won’t need to download a copy of all the static resources again and can instead just use the existing copy in their local cache. ??

    Thread Starter Craig

    (@craigrkirkby)

    @raamdev

    Wow, thank you for your detailed, clear replies. Very helpful. Much appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Is the Expiration Time function the same as an Expires Header?’ is closed to new replies.