Title: Browser cache not working
Last modified: July 17, 2023

---

# Browser cache not working

 *  Resolved [innovativezome](https://wordpress.org/support/users/innovativezome/)
 * (@innovativezome)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/browser-cache-not-working-5/)
 * Hello Developers,
 * I installed LAMP (Apache) for wordpress and using hummingbird. When I tried to
   enable browser cache, hummingbird recognises my server Apache but do not add 
   rules to .htaccess file. My site’s .htaccess file is writeable but still I can
   not enable browser cache.

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

 *  [Kris – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport13/)
 * (@wpmudevsupport13)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/browser-cache-not-working-5/#post-16899867)
 * Hi [@innovativezome](https://wordpress.org/support/users/innovativezome/)
 * I hope you are doing well today.
 * Can you add those rules manully to your htaccess file and see if that helps?
 *     ```wp-block-code
       <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|woff2|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|woff2|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>
       ```
   
 * Kind Regards,
   Kris
 *  Thread Starter [innovativezome](https://wordpress.org/support/users/innovativezome/)
 * (@innovativezome)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/browser-cache-not-working-5/#post-16913492)
 * My .htaccess file already contains same code.
 * On top of it, I am getting this error Gzip is not working properly:
 * Although Deflate module is enabled in my Apache2 server.
 *  Plugin Support [Dmytro – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport16/)
 * (@wpmudevsupport16)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/browser-cache-not-working-5/#post-16916486)
 * Hello [@innovativezome](https://wordpress.org/support/users/innovativezome/),
 * Could you please check if your server is connected to a CDN, e.g. CloudFlare.
 * Some hosting providers and services like CloudFlare may have Brotli compression
   enabled. Currently, Hummingbird can’t detect Brotli compression, so it will display
   a warning.
 * You can verify if that’s the case with your site using an online tool like this
   one:
    [https://www.giftofspeed.com/gzip-test/](https://www.giftofspeed.com/gzip-test/)
 * If you get “_Brotli Is Enabled_“, then Gzip compression won’t be required.
 * If the server is connected to CloudFlare CDN, then the browser caching options
   can be adjusted in the CloudFlare panel:
    [https://prnt.sc/jhfTwktURgGS](https://prnt.sc/jhfTwktURgGS)
 * or in Hummingbird, after configuring CloudFlare integration (_Hummingbird >> 
   Browser Caching >> Integrations_).
 * If you’re not sure whether the server is connected to a CDN service like CloudFlare,
   you can either check it with the hosting support, or find your domain’s NS records
   with this tool: [https://dnschecker.org/](https://dnschecker.org/)
 * – select NS in the dropdown list, and press the _Search_ button: [https://prnt.sc/xuhXqdp-_-Vs](https://prnt.sc/xuhXqdp-_-Vs)
 * Please let us know if the above suggestions helped, or if there’s still any issue.
 * Best Regards,
    Dmytro
 *  Plugin Support [Nithin – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport11/)
 * (@wpmudevsupport11)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/browser-cache-not-working-5/#post-16940346)
 * Hi [@innovativezome](https://wordpress.org/support/users/innovativezome/),
 * Since we haven’t heard from you for a while. I’ll mark this thread as resolved
   for now. Please feel free to re-open the thread if you need further assistance.
 * Regards
   Nithin

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

The topic ‘Browser cache 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/)

 * 4 replies
 * 4 participants
 * Last reply from: [Nithin – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport11/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/browser-cache-not-working-5/#post-16940346)
 * Status: resolved