• Resolved Cartographer

    (@cartographer)


    Hi all,

    I would like to ask if it is ok to use this code for leverage browsing caching in my .htaccess

    ## EXPIRES CACHING ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType text/css "access 1 month"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access 2 days"
    </IfModule>
    ## EXPIRES CACHING ##

    Will be any conflict with Quick Cache?

    https://wordpress.org/plugins/quick-cache/

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

    (@raamdev)

    Hello,

    I’m sorry that you didn’t receive a response.

    You can add that code to your .htaccess file. It should work fine with Quick Cache.

    So by the looks of it, ‘Client Side Cache’ in plugins options is not the same as Leverage Browsing Cache?

    They are not the same, each must be entered in to the .htaccess file separately as shown here:
    For GZIP Compression:

    <IfModule mod_deflate.c>
    <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE text/plain text/html application/x-httpd-php-source
    AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd
    AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml
    AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript
    AddOutputFilterByType DEFLATE font/truetype application/x-font-ttf font/opentype application/x-font-otf
    </IfModule>
    </IfModule>

    And for expired headers:

    <IfModule mod_expires.c>
    AddType image/x-icon .ico
    ExpiresActive on
    ExpiresByType image/jpeg A2592000
    ExpiresByType image/gif A2592000
    ExpiresByType image/png A2592000
    ExpiresByType image/x-icon A2592000
    ExpiresByType application/x-javascript A2592000
    ExpiresByType text/css M604800
    ExpiresDefault M604800
    </IfModule>

    As you can see they’re completely different.

    I ment ‘Client Side Cache’ from plugin options VS ‘Leverage…’ not VS GZIP Compression 🙂

    Plugin Author Raam Dev

    (@raamdev)

    Disabling Client-Side Caching in Quick Cache (Dashboard → Quick Cache → Client-Side Cache) only does the following:

    • Removes header: Last-Modified
    • Adds header: Expires: Wed, 11 Jan 1984 05:00:00 GMT
    • Adds header: Cache-Control: no-cache, must-revalidate, max-age=0
    • Adds header: Pragma: no-cache

    By default, Client-Side Caching is disabled in Quick Cache, so by default those things above will happen. If you enable Client-Side Caching then Quick Cache will simply not do those things, allowing the browser to cache whatever it likes.

    If you want finer control over how long browser caches things,, you can add the mod_expires code as shown above to your .htaccess file.

    Ok, thanks.

    Going to still be a noob and ask – so what combination would you advice for a website that doesn’t offer any membership features/functionality?

    – Enable Client-Side Cache AND add the code to .htaccess
    – Disable Client-Side Cache AND add the code to .htaccess
    – any other combination?

    And what about website that has for example WooCommerce shop on it?

    Much appreciate your help 🙂

    Plugin Author Raam Dev

    (@raamdev)

    If you don’t offer any membership features and/or your users don’t login to your site, then you can safely enable Client-Side Caching. In this scenario, you can also add the code mentioned above to your .htaccess file (in fact, you can add the .htaccess code even when using a membership site; it’s only the Client-Side Caching option that should be disabled when running a membership site).

    And what about website that has for example WooCommerce shop on it?

    The latest version of WooCommerce supports the use of the DONOTCACHEPAGE constant and adds that constant to any pages that should not be cached. Quick Cache also supports the DONOTCACHEPAGE constant, so if you’re running the latest version of WooCommerce, you shouldn’t need to make any additional configuration with Quick Cache.

    Thank you kindly, that clarifies the issue 🙂

    Only starting to play around with caching / minifying, so still a bit confused on how to set up everything right that I don’t break the end result totally.

    I have chosen your plugin, cause other 2 more popular ones look a bit too advanced for a beginner – too many ticks could go wrong.

    And yes, despite having less features, results look quite satisfying!

    Thanks again.

    Plugin Author Raam Dev

    (@raamdev)

    @kramarz Thank you! I’m glad you’re enjoying the plugin. When you’re done going over it I’d love if you’d rate Quick Cache for me. 🙂

    Plugin Author Raam Dev

    (@raamdev)

    @kramarz Ah, you beat me to it! I see you already left a review. Thank you so much! 🙂

    🙂

    I might be back here for some more advices though!
    Be Warned!

    All the best.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Leverage browser caching’ is closed to new replies.