Title: Browser caching &#8211; Caching the document loaded?
Last modified: August 21, 2018

---

# Browser caching – Caching the document loaded?

 *  Resolved [Will Stocks](https://wordpress.org/support/users/willstockstech/)
 * (@willstockstech)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/browser-caching-caching-the-document-loaded/)
 * If I load a page/homepage/post – the actual document itself isn’t cached at all(
   even for say 10 minutes?) and even if I try to tweak the htaccess rules to cater
   for something like
    ExpiresByType text/html A3600 Or a super generic Header set
   Cache-Control “max-age=3600, must-revalidate”
 * These new rules just don’t seem to take whatsoever. Is there anyway of having
   a page/post cache in the browser for any period of time?
 * Also is there a way to validate the page cache is working/being used? How are
   requests being rewritten to utilize the cache, as there’s no htaccess rule for
   this? Is it being handled via PHP?

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

 *  [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/browser-caching-caching-the-document-loaded/#post-10610745)
 * Hi [@willstockstech](https://wordpress.org/support/users/willstockstech/),
 * You can use any online tool to validate the browser cache. Also, Browser Caching
   caches assets (css, js, images, etc). So you should be checking these files, 
   not your main page/post. To cache the page/post you should enable Page Caching.
 * WordPress has a built-in system for page caching. For it to work, you need to
   activate Page Caching in Hummingbird, which will do the following:
 * 1. Add a define( ‘WP_CACHE’, true ); to your wp-config.php file
    2. Create an
   advanced-cache.php file inside the wp-content folder
 * This will allow WordPress to route the requests through the advanced-cache.php
   file first. That way Hummingbird can validate if the cache file is present and
   server it to the user.
 * Also, if you open up the developer tools in your browser and view the page source,
   you will see Hummingbird comments at the top and bottom of the HTML page (if 
   it is a cached page).
 * Best regards,
    Anton
 *  Thread Starter [Will Stocks](https://wordpress.org/support/users/willstockstech/)
 * (@willstockstech)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/browser-caching-caching-the-document-loaded/#post-10610795)
 * Hi [@vanyukov](https://wordpress.org/support/users/vanyukov/)
 * Thanks for confirming. I know with WP Super Cache, I previously had it setup 
   so that if someone visited a page (home page for example), it would hit the page
   cache for that page, then if they visited a post (they’d hit the page cache) 
   and then returned to the home page, it wouldn’t send an extra request over to
   the server for a cached copy of the home page for a second time, despite that
   they were just there – I had it setup so that the home page was browser cached
   for 15 mins (IIRC) so the homepage load was a) immediate and b) didn’t result
   in another request out.
 * The only other thing I thought is I could do something like
    is_home() { header(“
   Cache-Control: max-age = 600”); }
 * Would that work for my use case, do you know?
 *  [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/browser-caching-caching-the-document-loaded/#post-10610815)
 * [@willstockstech](https://wordpress.org/support/users/willstockstech/),
 * You can try to set the expiry time in browser caching setting for HTML to 1 hour.
   Don’t know if that will help or not, never really tested such a scenario. You
   might need some .htaccess rules for that. But Hummingbird does not have support
   for this yet. It is planned for the near future, though.
 * Best regards,
    Anton
 *  Thread Starter [Will Stocks](https://wordpress.org/support/users/willstockstech/)
 * (@willstockstech)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/browser-caching-caching-the-document-loaded/#post-10610872)
 * Ahhh, OK – In that case, I’ll wait for the near future as it sounds like Hummingbird
   has some extra useful features coming soon! 😀 😀

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

The topic ‘Browser caching – Caching the document loaded?’ 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
 * 2 participants
 * Last reply from: [Will Stocks](https://wordpress.org/support/users/willstockstech/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/browser-caching-caching-the-document-loaded/#post-10610872)
 * Status: resolved