Title: Leverage browser caching
Last modified: August 21, 2016

---

# Leverage browser caching

 *  Resolved [Cartographer](https://wordpress.org/support/users/cartographer/)
 * (@cartographer)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/leverage-browser-caching-3/)
 * 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/](https://wordpress.org/plugins/quick-cache/)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [Raam Dev](https://wordpress.org/support/users/raamdev/)
 * (@raamdev)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-3/#post-4586896)
 * 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.
 *  [Kramarz](https://wordpress.org/support/users/kramarz/)
 * (@kramarz)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-3/#post-4586897)
 * So by the looks of it, ‘Client Side Cache’ in plugins options is not the same
   as Leverage Browsing Cache?
 *  [johnzenausa](https://wordpress.org/support/users/johnzenausa/)
 * (@johnzenausa)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-3/#post-4586899)
 * 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.
 *  [Kramarz](https://wordpress.org/support/users/kramarz/)
 * (@kramarz)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-3/#post-4586900)
 * I ment ‘Client Side Cache’ from plugin options VS ‘Leverage…’ not VS GZIP Compression
   🙂
 *  Plugin Author [Raam Dev](https://wordpress.org/support/users/raamdev/)
 * (@raamdev)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-3/#post-4586901)
 * 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.
 *  [Kramarz](https://wordpress.org/support/users/kramarz/)
 * (@kramarz)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-3/#post-4586902)
 * 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](https://wordpress.org/support/users/raamdev/)
 * (@raamdev)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-3/#post-4586903)
 * 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.
 *  [Kramarz](https://wordpress.org/support/users/kramarz/)
 * (@kramarz)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-3/#post-4586904)
 * 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](https://wordpress.org/support/users/raamdev/)
 * (@raamdev)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-3/#post-4586905)
 * [@kramarz](https://wordpress.org/support/users/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](http://www.websharks-inc.com/r/wordpress-rate-quick-cache/)
   for me. 🙂
 *  Plugin Author [Raam Dev](https://wordpress.org/support/users/raamdev/)
 * (@raamdev)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-3/#post-4586906)
 * [@kramarz](https://wordpress.org/support/users/kramarz/) Ah, you beat me to it!
   I see you already left a review. Thank you so much! 🙂
 *  [Kramarz](https://wordpress.org/support/users/kramarz/)
 * (@kramarz)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-3/#post-4586907)
 * 🙂
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/quick-cache_efefef.svg)
 * [Quick Cache (Speed Without Compromise)](https://wordpress.org/plugins/quick-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/quick-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/quick-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/quick-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/quick-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/quick-cache/reviews/)

 * 11 replies
 * 4 participants
 * Last reply from: [Kramarz](https://wordpress.org/support/users/kramarz/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-3/#post-4586907)
 * Status: resolved