Title: Leverage Browser Caching
Last modified: August 15, 2017

---

# Leverage Browser Caching

 *  Resolved [KtownJack](https://wordpress.org/support/users/ktownjack/)
 * (@ktownjack)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/leverage-browser-caching-44/)
 * Greetings Hummingbird Support Team:
 * I have set all the cache types for 8 days, copied and pasted the .htaccess cache
   code in my .htaccess file yet when I click the “R-ECHECK EXPIRY” button, I still
   have approximately 40 png, jpg, css and js files that Humming bird reports as
   having anywhere from no expiration date set to 25+ hours expiration.
 * Below is the Hummingbird .htaccess code:
 * # BEGIN WP-HUMMINGBIRD-CACHING
 * <IfModule mod_expires.c>
    ExpiresActive On ExpiresDefault A0
 * <FilesMatch “\.(txt|xml|js)$”>
    ExpiresDefault A691200 </FilesMatch>
 * <FilesMatch “\.(css)$”>
    ExpiresDefault A691200 </FilesMatch>
 * <FilesMatch “\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac)
   $”>
    ExpiresDefault A691200 </FilesMatch>
 * <FilesMatch “\.(jpg|jpeg|png|gif|swf|webp)$”>
    ExpiresDefault A691200 </FilesMatch
   > </IfModule>
 * <IfModule mod_headers.c>
    <FilesMatch “\.(txt|xml|js)$”> Header set Cache-Control“
   max-age=691200” </FilesMatch>
 *  <FilesMatch “\.(css)$”>
    Header set Cache-Control “max-age=691200” </FilesMatch
   >
 *  <FilesMatch “\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac)
   $”>
    Header set Cache-Control “max-age=691200” </FilesMatch>
 *  <FilesMatch “\.(jpg|jpeg|png|gif|swf|webp)$”>
    Header set Cache-Control “max-
   age=691200” </FilesMatch> </IfModule> # END WP-HUMMINGBIRD-CACHING
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fleverage-browser-caching-44%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/leverage-browser-caching-44/#post-9413373)
 * Hi [@ktownjack](https://wordpress.org/support/users/ktownjack/),
 * Can you remove the code that was manually added to .htaccess and re-check the
   status on the caching page? Will it report a disabled status for all cache types?
   If yes, try and add the code automatically.
 * By the way, I can’t open your website, I get an access denied message.
 * Best regards,
    Anton
 *  Thread Starter [KtownJack](https://wordpress.org/support/users/ktownjack/)
 * (@ktownjack)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/leverage-browser-caching-44/#post-9418919)
 * Thank You Anton:
 * I removed the Hummingbird cache code from the .htaccess, re-ran another test 
   but the cache page still showed all the assets as being 8 days. I also see that
   have more caching control in the .htaccess file, which I show down below. Also
   our CDN provider has a number of country codes that are blacklisted from access
   [https://www.alhloghomes.com/](https://www.alhloghomes.com/) Please provide me
   your country and I will whitelist it:)
 * Thank You
    Jack
 * # BEGIN WpFastestCache
    <IfModule mod_rewrite.c> RewriteEngine On RewriteBase/
   RewriteCond %{HTTPS} =on RewriteCond %{HTTP_HOST} ^www.alhloghomes.com # Start
   WPFC Exclude RewriteCond %{REQUEST_URI} !member-registration-form [NC] # End 
   WPFC Exclude RewriteCond %{HTTP_HOST} ^www.alhloghomes.com RewriteCond %{HTTP_USER_AGENT}!(
   facebookexternalhit|WhatsApp|Mediatoolkitbot) RewriteCond %{REQUEST_METHOD} !
   POST RewriteCond %{REQUEST_URI} !(\/){2}$ RewriteCond %{REQUEST_URI} \/$ RewriteCond%{
   QUERY_STRING} !.+ RewriteCond %{HTTP:Cookie} !comment_author_ RewriteCond %{HTTP:
   Cookie} !wp_woocommerce_session RewriteCond %{HTTP:Cookie} !safirmobilswitcher
   =mobil RewriteCond %{HTTP:Profile} !^[a-z0-9\”]+ [NC] RewriteCond %{DOCUMENT_ROOT}/
   wp-content/cache/all/$1/index.html -f [or] RewriteCond /home/alhlogh1/public_html/
   wp-content/cache/all/$1/index.html -f RewriteRule ^(.*) “/wp-content/cache/all/
   $1/index.html” [L] </IfModule> <FilesMatch “index\.(html|htm)$”> AddDefaultCharset
   UTF-8 <ifModule mod_headers.c> FileETag None Header unset ETag Header set Cache-
   Control “max-age=0, no-cache, no-store, must-revalidate” Header set Pragma “no-
   cache” Header set Expires “Mon, 29 Oct 1923 20:30:00 GMT” </ifModule> </FilesMatch
   > # END WpFastestCache # BEGIN LBCWpFastestCache <FilesMatch “\.(ico|pdf|flv|
   jpg|jpeg|png|gif|webp|js|css|swf|x-html|css|xml|js|woff|woff2|ttf|svg|eot)(\.
   gz)?$”> <IfModule mod_expires.c> AddType application/font-woff2 .woff2 ExpiresActive
   On ExpiresDefault A0 ExpiresByType image/webp A2592000 ExpiresByType image/gif
   A2592000 ExpiresByType image/png A2592000 ExpiresByType image/jpg A2592000 ExpiresByType
   image/jpeg A2592000 ExpiresByType image/ico A2592000 ExpiresByType image/svg+
   xml A2592000 ExpiresByType text/css A2592000 ExpiresByType text/javascript A2592000
   ExpiresByType application/javascript A2592000 ExpiresByType application/x-javascript
   A2592000 ExpiresByType application/font-woff2 A2592000 </IfModule> <IfModule 
   mod_headers.c> Header set Expires “max-age=2592000, public” Header unset ETag
   Header set Connection keep-alive FileETag None </IfModule> </FilesMatch> # END
   LBCWpFastestCache
 * <IfModule mod_expires.c>
    ExpiresActive On ExpiresDefault A0
 * <FilesMatch “\.(txt|xml|js)$”>
    ExpiresDefault A691200 </FilesMatch>
 * <FilesMatch “\.(css)$”>
    ExpiresDefault A691200 </FilesMatch>
 * <FilesMatch “\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac)
   $”>
    ExpiresDefault A691200 </FilesMatch>
 * <FilesMatch “\.(jpg|jpeg|png|gif|swf|webp)$”>
    ExpiresDefault A691200 </FilesMatch
   > </IfModule>
 * <IfModule mod_headers.c>
    <FilesMatch “\.(txt|xml|js)$”> Header set Cache-Control“
   max-age=691200” </FilesMatch>
 *  <FilesMatch “\.(css)$”>
    Header set Cache-Control “max-age=691200” </FilesMatch
   >
 *  <FilesMatch “\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac)
   $”>
    Header set Cache-Control “max-age=691200” </FilesMatch>
 *  <FilesMatch “\.(jpg|jpeg|png|gif|swf|webp)$”>
    Header set Cache-Control “max-
   age=691200” </FilesMatch> </IfModule>
 *  [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/leverage-browser-caching-44/#post-9420164)
 * Hi [@ktownjack](https://wordpress.org/support/users/ktownjack/),
 * I see that you have WP Fastest Cache enabled. If you use multiple plugins for
   optimization, you need to make sure that same functionality is not enabled in
   all the plugins or it will cause conflicts. So if you are using browser caching
   and gzip compression in WP Fastest Cache, do not enable it in HB. Or if you prefer
   to use them in HB, disable these functions in the other plugin.
 * Hope this helps resolve your issue.
 * I’m from Russia, if you unblock it, I will be able to check your website.
 * Best regards,
    Anton
 *  [jdailey](https://wordpress.org/support/users/jdailey/)
 * (@jdailey)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/leverage-browser-caching-44/#post-9495115)
 * Thank you for using Hummingbird! I am going to close this ticket. If you have
   any further questions please let us know.

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

The topic ‘Leverage Browser Caching’ 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
 * 3 participants
 * Last reply from: [jdailey](https://wordpress.org/support/users/jdailey/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/leverage-browser-caching-44/#post-9495115)
 * Status: resolved