Title: Leverage Browser Caching
Last modified: February 10, 2018

---

# Leverage Browser Caching

 *  [Jos Klever](https://wordpress.org/support/users/josklever/)
 * (@josklever)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/leverage-browser-caching-53/)
 * I’ve just tried this plugin because it looks really great, but I can’t find the
   setting to enable “Leverage Browser Caching” which should be available according
   to the specs.

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

 *  Plugin Author [swte](https://wordpress.org/support/users/swte/)
 * (@swte)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/leverage-browser-caching-53/#post-9961169)
 * Hi,
 * You can find it under Settings > Caching > General
    [https://www.evernote.com/l/AkB-Vv7ptO5DKpmm7elLY9b8bCMu1-uyCE4](https://www.evernote.com/l/AkB-Vv7ptO5DKpmm7elLY9b8bCMu1-uyCE4)
 * Just check Enable Browser Cache option
    [https://www.evernote.com/l/AkDiwm19vVtEdL2mVSPX_tlNRB9aQk5c8Mo](https://www.evernote.com/l/AkDiwm19vVtEdL2mVSPX_tlNRB9aQk5c8Mo)
 *  Thread Starter [Jos Klever](https://wordpress.org/support/users/josklever/)
 * (@josklever)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-53/#post-9961762)
 * I must have missed it, but I see it’s on by default and so it is on the site 
   I’m testing the plugin on. GTMetrix however shows it needs optimization. So I
   still need to add the Expire headers rules to my .htaccess myself. I was hoping
   that your plugin would take care of it.
 *  Plugin Author [swte](https://wordpress.org/support/users/swte/)
 * (@swte)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-53/#post-9961940)
 * Are you using Apache or Litespeed?
 *  Thread Starter [Jos Klever](https://wordpress.org/support/users/josklever/)
 * (@josklever)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-53/#post-9961961)
 * Nginx in front of Apache
 *  Plugin Author [swte](https://wordpress.org/support/users/swte/)
 * (@swte)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-53/#post-9962510)
 * Strange. And static files are served by Apache or Nginx? Can you also copy the
   htaccess code which solved the issue?
 * Thanks!
 *  Thread Starter [Jos Klever](https://wordpress.org/support/users/josklever/)
 * (@josklever)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-53/#post-9962518)
 * Apache, I guess…
 * When I add the following lines to .htaccess of the site it’s fine. That’s how
   I did it before, but as I said, I was wondering if your plugin would take care
   of that.
 *     ```
       ## EXPIRES CACHING ##
       <IfModule mod_expires.c>
       # Fonts
       # Add correct content-type for fonts
       AddType application/vnd.ms-fontobject .eot 
       AddType application/x-font-ttf .ttf
       AddType application/x-font-opentype .otf
       AddType application/x-font-woff .woff
       AddType image/svg+xml .svg
   
       # Compress compressible fonts
       # only uncomment if you dont have compression turned on already. Otherwise it will cause all other filestypes not to get compressed
       # AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-opentype image/svg+xml
   
       ExpiresActive on
   
       # Add a far future Expires header for fonts
       ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
       ExpiresByType application/x-font-ttf "access plus 1 year"
       ExpiresByType application/x-font-opentype "access plus 1 year"
       ExpiresByType application/x-font-woff "access plus 1 year"
       ExpiresByType image/svg+xml "access plus 1 year"
       ExpiresByType image/jpg "access plus 1 year"
       ExpiresByType image/jpeg "access plus 1 year"
       ExpiresByType image/gif "access plus 1 year"
       ExpiresByType image/png "access plus 1 year"
       ExpiresByType text/css "access plus 1 month"
       ExpiresByType application/pdf "access plus 1 month"
       ExpiresByType text/javascript "access plus 1 month"
       ExpiresByType application/x-javascript "access plus 1 month"
       ExpiresByType application/javascript "access plus 1 month"
       ExpiresByType application/x-shockwave-flash "access plus 1 month"
       ExpiresByType image/x-icon "access plus 1 year"
       ExpiresDefault "access plus 2 days"
       </IfModule>
       ## EXPIRES CACHING ##
       ```
   
 *  Plugin Author [swte](https://wordpress.org/support/users/swte/)
 * (@swte)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-53/#post-9962896)
 * The plugin adds the following rules (so I am not sure why it isn’t working :-/):
 * # ——————————————————————————
    # | Expires headers (for better cache control) 
   | # —————————————————————————— <IfModule mod_expires.c> ExpiresActive on ExpiresDefault“
   access plus 1 month”
 *  # CSS
    ExpiresByType text/css “access plus 1 year”
 *  # Data interchange
    ExpiresByType application/json “access plus 0 seconds” ExpiresByType
   application/xml “access plus 0 seconds” ExpiresByType text/xml “access plus 0
   seconds”
 *  # Favicon (cannot be renamed!)
    ExpiresByType image/x-icon “access plus 1 week”
 *  # HTML components (HTCs)
    ExpiresByType text/x-component “access plus 1 month”
 *  # HTML
    ExpiresByType text/html “access plus 0 seconds”
 *  # JavaScript
    ExpiresByType application/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 month” ExpiresByType image/gif“
   access plus 1 month” ExpiresByType image/jpeg “access plus 1 month” ExpiresByType
   image/png “access plus 1 month” ExpiresByType video/mp4 “access plus 1 month”
   ExpiresByType video/ogg “access plus 1 month” ExpiresByType video/webm “access
   plus 1 month”
 *  # 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 month” ExpiresByType
   application/font-woff2 “access plus 1 month” ExpiresByType application/vnd.ms-
   fontobject “access plus 1 month” ExpiresByType application/x-font-ttf “access
   plus 1 month” ExpiresByType font/opentype “access plus 1 month” ExpiresByType
   image/svg+xml “access plus 1 month”
 * </IfModule>
 *  Thread Starter [Jos Klever](https://wordpress.org/support/users/josklever/)
 * (@josklever)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-53/#post-9963026)
 * Neither am I. I’ll test it tomorrow on another website and do a test with all
   plugins deactivated to check for a conflict.
 * At least it’s not an issue, that .htaccess isn’t writable, because other lines
   are added by Swift Performance.

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

The topic ‘Leverage Browser Caching’ is closed to new replies.

 * ![](https://ps.w.org/swift-performance-lite/assets/icon-256x256.jpg?rev=2388229)
 * [Swift Performance Lite](https://wordpress.org/plugins/swift-performance-lite/)
 * [Support Threads](https://wordpress.org/support/plugin/swift-performance-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/swift-performance-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/swift-performance-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/swift-performance-lite/reviews/)

## Tags

 * [settings](https://wordpress.org/support/topic-tag/settings/)

 * 8 replies
 * 2 participants
 * Last reply from: [Jos Klever](https://wordpress.org/support/users/josklever/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/leverage-browser-caching-53/#post-9963026)
 * Status: not resolved