Title: Browser Caching Not Working
Last modified: November 11, 2020

---

# Browser Caching Not Working

 *  Resolved [activelightning](https://wordpress.org/support/users/activelightning/)
 * (@activelightning)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/browser-caching-not-working-4/)
 * Hi,
 * I am attempting to get my browser caching to work and for some reason, it will
   not work. I’ve SSH’ed into my server and enabled the expires module:
 *     ```
       Loaded Modules:
        core_module (static)
        so_module (static)
        watchdog_module (static)
        http_module (static)
        log_config_module (static)
        logio_module (static)
        version_module (static)
        unixd_module (static)
        access_compat_module (shared)
        alias_module (shared)
        auth_basic_module (shared)
        authn_core_module (shared)
        authn_file_module (shared)
        authz_core_module (shared)
        authz_host_module (shared)
        authz_user_module (shared)
        autoindex_module (shared)
        deflate_module (shared)
        dir_module (shared)
        env_module (shared)
        expires_module (shared)
        filter_module (shared)
        headers_module (shared)
        mime_module (shared)
        mpm_prefork_module (shared)
        negotiation_module (shared)
        php7_module (shared)
        reqtimeout_module (shared)
        rewrite_module (shared)
        setenvif_module (shared)
        socache_shmcb_module (shared)
        ssl_module (shared)
        status_module (shared)
       ```
   
 * From there, I went in and auto-enabled the plugin, which created this in my .
   htaccess file:
 *     ```
       # BEGIN WordPress
       # The directives (lines) between "BEGIN WordPress" and "END WordPress" are
       # dynamically generated, and should only be modified via WordPress filters.
       # Any changes to the directives between these markers will be overwritten.
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       RewriteRule ^index\.php$ - [L]
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /index.php [L]
       </IfModule>
       # END WordPress
   
       # BEGIN WP-HUMMINGBIRD-CACHING
       # The directives (lines) between "BEGIN WP-HUMMINGBIRD-CACHING" and "END WP-HUMMINGBIRD-CACHING" are
       # dynamically generated, and should only be modified via WordPress filters.
       # Any changes to the directives between these markers will be overwritten.
       <IfModule mod_expires.c>
       ExpiresActive On
       ExpiresDefault A0
       <FilesMatch "\.(txt|xml|js)$">
       ExpiresDefault A31536000
       </FilesMatch>
       <FilesMatch "\.(css)$">
       ExpiresDefault A31536000
       </FilesMatch>
       <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$">
       ExpiresDefault A31536000
       </FilesMatch>
       <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
       ExpiresDefault A31536000
       </FilesMatch>
       </IfModule>
       <IfModule mod_headers.c>
         <FilesMatch "\.(txt|xml|js)$">
          Header set Cache-Control "max-age=31536000"
         </FilesMatch>
         <FilesMatch "\.(css)$">
          Header set Cache-Control "max-age=31536000"
         </FilesMatch>
         <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$">
          Header set Cache-Control "max-age=31536000"
         </FilesMatch>
         <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
          Header set Cache-Control "max-age=31536000"
         </FilesMatch>
       </IfModule>
       # END WP-HUMMINGBIRD-CACHING
       ```
   
 * From there, I cleared all my cache, enabled and disabled the caching, and still
   no success. Does anyone have any advice?

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

 *  Plugin Support [Nithin – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport11/)
 * (@wpmudevsupport11)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/browser-caching-not-working-4/#post-13654123)
 * Hi [@activelightning](https://wordpress.org/support/users/activelightning/) ,
 * Could we know what exact error message you notice in “Browser Caching” page under
   Hummingbird > Caching > Browser Caching
 * The code in .htaccess does look fine too. Could you please try clicking the “**
   Re-Check Status**” button and then check whether it makes any difference?
 * If you still have issues even after that then please do share a full-page screenshot
   on what exactly you notice in “Browser Caching” page so that we could have a 
   better idea.
 * Looking forward to your response.
 * Kind Regards,
    Nithin
 *  Thread Starter [activelightning](https://wordpress.org/support/users/activelightning/)
 * (@activelightning)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/browser-caching-not-working-4/#post-13654144)
 * Hi Nithin,
 * I’ve hit the recheck button and still have the same issue. You can find an attached
   image of the error [here](https://ibb.co/7b6b7hB)
 * In addition, this is the error in plain text:
    Browser Caching is not working
   properly:
 * – Your server may not have the “expires” module enabled (mod_expires for Apache,
   ngx_http_headers_module for NGINX)
    – Another plugin may be interfering with 
   the configuration If re-checking and restarting does not resolve, please check
   with your host or open a support ticket with us.
 * Thanks for your help,
    Andrew
    -  This reply was modified 5 years, 8 months ago by [activelightning](https://wordpress.org/support/users/activelightning/).
    -  This reply was modified 5 years, 8 months ago by [activelightning](https://wordpress.org/support/users/activelightning/).
 *  Plugin Support [Nithin – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport11/)
 * (@wpmudevsupport11)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/browser-caching-not-working-4/#post-13658233)
 * Hi [@activelightning](https://wordpress.org/support/users/activelightning/)
 * Thanks for sharing a screenshot. Could you please check whether **zlib.output_compression**
   is enabled or not?
 * If not, to enable it, you can create php.ini file in the root directory and add
   the following:
    `zlib.output_compression = On`
 * The root directory is where the wp-config.php file, /wp-content/, /wp-admin, /
   wp-include folders reside.
 * Once done please click the “Re-Check Status” button and then see whether it makes
   any difference. Please do make sure to restart the server to ensure the changes
   are reflected.
 * Please do let us know how that goes.
 * Kind Regards,
    Nithin
 *  Thread Starter [activelightning](https://wordpress.org/support/users/activelightning/)
 * (@activelightning)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/browser-caching-not-working-4/#post-13659106)
 * Hi,
 * I’ve followed the instructions and did the restart to apache and nothing has 
   changed. I did create the php.ini file and put the line:
    `zlib.output_compression
   = On`
 * Do you have additional ideas? The error message stays the same. I’ve activated/
   deactivated, rechecked, and cleared my cache.
 * Thanks,
    Andrew
 *  Plugin Support [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * (@wpmudev-support2)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/browser-caching-not-working-4/#post-13692326)
 * Hello [@activelightning](https://wordpress.org/support/users/activelightning/),
 * I’m sorry for the delay on our end, looks like we didn’t receive the email notification
   for your last message.
 * In this case, can you try a plugin conflict test? You can read about it here 
   [https://premium.wpmudev.org/blog/wordpress-plugin-conflicts-how-to-check-for-them-and-what-to-do/](https://premium.wpmudev.org/blog/wordpress-plugin-conflicts-how-to-check-for-them-and-what-to-do/)
 * kind regards,
    Kasia
 *  Thread Starter [activelightning](https://wordpress.org/support/users/activelightning/)
 * (@activelightning)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/browser-caching-not-working-4/#post-13704977)
 * I’ve checked for conflicts and none of my plugins are modifying the same files.
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/browser-caching-not-working-4/#post-13718695)
 * Hi [@activelightning](https://wordpress.org/support/users/activelightning/)
 * Could you double-check if the mod_deflate is well configured?
 * Scroll to configuration section:
    [https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-mod_deflate-on-ubuntu-14-04](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-mod_deflate-on-ubuntu-14-04)
   [https://www.digitalocean.com/community/questions/htaccess-doesn-t-work-on-ubuntu-droplet](https://www.digitalocean.com/community/questions/htaccess-doesn-t-work-on-ubuntu-droplet)
 * And if the local htaccess can override the Apache htaccess.
 * Also, is it an Apache only server, or Nginx and Apache?
 * Best Regards
    Patrick Freitas
 *  [rjohnsonfbr1us](https://wordpress.org/support/users/rjohnsonfbr1us/)
 * (@rjohnsonfbr1us)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/browser-caching-not-working-4/#post-13722130)
 * I finally figured out the 4 cache expiry thing not working in hummingbird (they
   always showed up yellow either disabled or false.
 * The added caching code for some reason was not picked up wordpress when the code
   is added to htaccess.
 * To get it to work I had to move that code to my apache2.conf and then finally
   everything lit up green.
 * I read every single post on this issue in the top 10 google response and I can’t
   beleive I didnt find it.
 * Ron
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/browser-caching-not-working-4/#post-13814446)
 * Hi [@rjohnsonfbr1us](https://wordpress.org/support/users/rjohnsonfbr1us/)
 * I’m happy to hear you found the issue.
 * Yes, the apache2.conf need to allow the local htaccess to override the settings
   to make it work, or place it directly on the apache file.
 * I will go ahead and mark this ticket as resolved but feel free to let us know
   if you have any further question.
 * Best Regards
    Patrick Freitas
 *  Thread Starter [activelightning](https://wordpress.org/support/users/activelightning/)
 * (@activelightning)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/browser-caching-not-working-4/#post-13914757)
 * I’ve tried adding this directly to my apache conf file and it hasn’t done anything.
   I still get the same error.
 *  [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * (@wpmudev-support1)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/browser-caching-not-working-4/#post-13932322)
 * Hi [@activelightning](https://wordpress.org/support/users/activelightning/),
 * Browser Caching is a server side thing and Hummingbird tries to apply the required
   rules but it still depends on the server to allow these rules to work and to 
   overwrite server settings.
 * At this point I would suggest getting in touch with your hosting provider to 
   check this further for you and see why the rules are not working with their server
   setup.
 * Cheers,
    Predrag

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

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

 * ![](https://ps.w.org/hummingbird-performance/assets/icon-256x256.gif?rev=2633221)
 * [Hummingbird Performance - Cache & Page Speed Optimization for Core Web Vitals | Critical CSS | Minify CSS | Defer CSS Javascript | CDN](https://wordpress.org/plugins/hummingbird-performance/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hummingbird-performance/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hummingbird-performance/)
 * [Active Topics](https://wordpress.org/support/plugin/hummingbird-performance/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hummingbird-performance/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hummingbird-performance/reviews/)

## Tags

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

 * 11 replies
 * 6 participants
 * Last reply from: [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/browser-caching-not-working-4/#post-13932322)
 * Status: resolved