Title: About the browser cache
Last modified: July 14, 2022

---

# About the browser cache

 *  Resolved [atutrabajo](https://wordpress.org/support/users/atutrabajo/)
 * (@atutrabajo)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/about-the-browser-cache/)
 * Hello. I have been using your plugin for a while now and so far everything is
   ok.
 * However, recently I decided to redesign my site, for which I installed a copy
   on a subdomain and it is about this that I want to ask you the following query:
 * The site that (when I finish redesigning) is stage9.atutrabajo.org (*)
    Obviously,
   its original (which I intend to replace when I’m done is atutrabajo.org)
 * It said that, I continued (and continue) using your plugin within my installation.
   
   But since (for obvious reasons) I’m making a lot of changes that obviously need
   to be seen IMMEDIATELY, I read an answer from you a while back on this topic (
   Browser caching interferes with page changes in Elementor) where they suggested
   I enable:
 * …”Avoid object caching after changing settings”…
 * Under…”Performance> Browser Cache”…
 * And also that…
    …”Once the content of the files is changed, you need to click
   the “Refresh media query string” button at the top of the browser cache page 
   which will then generate a new query string and the browser will look for the
   new file”…
 * And that’s what I did and do (every time I make a major change).
 * So far so good. Except for one small “detail”…
    – This is how my site looks like(
   after a change), in an incognito window (Beautiful, by the way, heh); [https://ibb.co/cYmbGG5](https://ibb.co/cYmbGG5)
 * But…
    – If at the same time, I enter my site in a “normal” window, my site looks
   like this; [https://ibb.co/4M3VwrK](https://ibb.co/4M3VwrK)
 * Needless to say about the footer that, in “incognito mode” it looks like this;
   
   [https://ibb.co/F80Y8ry](https://ibb.co/F80Y8ry)
 * (That is, how it HAS to look)
 * – And instead, browsing “normally” at the same time, it looks like this;
    [https://ibb.co/C8HPYTp](https://ibb.co/C8HPYTp)
 * (I mean HORRIBLE)
 * So, here comes the question…
 * Is there any way to avoid this?
 * Because while I know this is “temporary”, I’m afraid that when I reupload the
   site (making it the “original”), it will happen to me in real time.
 * In other words, every time you make a change, if after a while a visitor enters(
   which will obviously do so in a “common” window), they will find the “horrible”
   version that I just described.
 * I await your comments.
 * From already thank you very much.
 * Greetings.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fabout-the-browser-cache%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/about-the-browser-cache/#post-15828037)
 * Hello [@atutrabajo](https://wordpress.org/support/users/atutrabajo/)
 * Thank you for reaching out and I am happy to assist you with this.
    The default
   TTL for the HTML in Browser Cache settings is 3600s. Just to confirm, when you
   update the media query string and check the website in the “normal” window, does
   the issue persists if you hard reload the page using Ctrl + F5? Thanks!
 *  Thread Starter [atutrabajo](https://wordpress.org/support/users/atutrabajo/)
 * (@atutrabajo)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/about-the-browser-cache/#post-15831376)
 * Hi Marko.
 * First of all, thanks for responding!
 * Having said that…
 * To your question. The answer is no.
 * That’s why I mentioned that…”it’s temporary”…
 * Although, you can imagine that…
 * I can NOT “depend” on my visitors to do that! TRUE? 🙂
 * Definitely.
 * Is there a way to avoid this, without it being “mandatory”…
 * to do F5 and/or refresh the site?
 * I await your comments.
 * From already thank you very much.
 * Greetings.
 * PS: As I already mentioned, I’m redesigning my site.
 * And, in that “way”, also improving the WPO (Optimization) of my site.
 * Ergo…
    I read somewhere about “server-side caching” and accordingly turned on“
   object caching”.
 * Do you think this will help – too – with this “problem”?
 * P.d 2: Regarding the TTL, if you tell me that, with 3600 seconds (6 minutes) 
   this is normal, then I don’t worry.
 * I understand that, perhaps, mine is pure “anxiety”.
 * What’s more, if you tell me that nothing else needs to be done, I believe you,
   heh.
    Anyway, now I have few visits (10/day/average) Which means less than 1 
   visit every TTL (3600 seconds). But… The idea of ​​all this is – obviously – 
   to improve this to (at least) 1000 visits/day.
 * And, if I succeed, would I have to “tweak” something in the TTL or simply update
   my changes and “pray” that visitors don’t find themselves – just – with a page
   without the latest changes?`
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/about-the-browser-cache/#post-15834383)
 * Hello [@atutrabajo](https://wordpress.org/support/users/atutrabajo/)
 * Thank you for your feedback.
    That hard refresh or restarting the browser is 
   needed. The reason for this is that the Browser also has a cache and once the
   content is changed or any files for that matter with different strings, they 
   need to be updated in the browser, meaning that the browser needs to fetch new
   files. I would recommend that if you do any changes you do this after or before
   the users usually visit the page so you can ensure that no uses are on the page
   you are currently editing. So this is not related to the W3TC or server-side 
   cache, instead, it’s on the user’s end – in their browsers. This is completely
   normal behavior.
 * I hope this helps!
 * THanks!
 *  Thread Starter [atutrabajo](https://wordpress.org/support/users/atutrabajo/)
 * (@atutrabajo)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/about-the-browser-cache/#post-15835575)
 * Hi Marko.
 * Yes. Help (a little, heh!).
 * So what I’m doing is fine (I think:).
 * That is:
 * 1) I am finishing the redesign of my site.
 * 2) When I’m done I reupload it (through my staging service).
 * And this – in turn – will “imply” that…
 * 3) ALL those assets (Pages/Posts) will NO longer have changes, heh.
 * Therefore, I will only have to “worry” about the new articles and/or pages that
   I load, right?
 * I await your comments.
 * From already thank you very much.
 * Greetings.
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/about-the-browser-cache/#post-15835833)
 * Hello [@atutrabajo](https://wordpress.org/support/users/atutrabajo/)
 * Thank you for your feedback.
    Yes, that is correct. And once the new or updated
   posts/articles are added or updated, W3TC will automatically purge the cache 
   and the changes will be visible on the users’ end. Thanks!
 *  Thread Starter [atutrabajo](https://wordpress.org/support/users/atutrabajo/)
 * (@atutrabajo)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/about-the-browser-cache/#post-15835888)
 * Okay. So, that’s all for now.
 * Again, thanks for everything.
 * Greetings.
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/about-the-browser-cache/#post-15835930)
 * Hello [@atutrabajo](https://wordpress.org/support/users/atutrabajo/)
 * You are most welcome!
 * Thanks!
 *  Thread Starter [atutrabajo](https://wordpress.org/support/users/atutrabajo/)
 * (@atutrabajo)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/about-the-browser-cache/#post-15882102)
 * Hi Marko.
    First of all, excuse my insistence. But there is something I don’t
   understand: You say that… …”The reason for this is that the browser also has 
   a cache and once the content is changed or any files with different strings need
   to be updated in the browser, which means the browser needs to check for new 
   files”. . Me what… …”I would recommend that if you do make any changes, you do
   so after or before users usually visit the page, so that you can ensure there
   are no uses on the page you are currently editing.”… And that, consequently… …”
   this is not related to W3TC or server-side caching, but is on the user’s end,
   in their browsers. This is completely normal behavior”… Let me tell you that,
   last night I was adding content to one of my articles until 3am and, this morning,
   I saw ALL the changes made to it in an incognito window. But… I didn’t see ANY
   in my normal window. Until I updated the browser. And – honestly – I’m “afraid”
   that I’m doing something wrong with the browser and/or page cache. That is, you
   and I know that NO visitor will search for information in – for example – Google
   and, when they find my article (I hope, heh), they will enter using an incognito
   window, heh. And, if it is the 1st. time you enter, you will also not know if
   there is “something else”. So I highly doubt you’ll do F5 and/or Refresh the 
   page. Ergo. You are going to enter from a “common” window and, my fear is, you
   will NOT see the changes I have made.
 *     ```
       Just in case, I'll pass you my numbers (Obviously, the ones with a check mark like this ✓ are enabled and the ones that aren't, no:) :
       1) Page Cache: Enable
       Page Cache Method: Disk: Basic
       2) Browser Cache: Enable
       3) Page Cache: General
       ✓ Cache the ticket page
       Do not cache the home page
       ✓ Caching feeds: site, categories, tags, comments
       ✓ Cache SSL (HTTPS) requests
       ✓ Cache URIs with query string variables
       Cache 404 pages (not found)
       ✓ Do not cache pages for connected users
       Do not cache pages for the following user roles
       3.1) Cache preload
       ✓ Automatically prioritize page cache
       Refresh interval: 1800 seconds
       Pages per interval: 10
       Sitemap URL: ***/sitemap_index.xml
       ✓ Preload the post cache upon publish events
       ```
   
 * 4) Browser Cache: General
    ✓ Set Last-Modified header ✓ Set header expiration
   ✓ Set header control cache ✓ Set Entity Tag (ETag) ✓ Set the W3 full cache header
   ✓ Enable HTTP (gzip) compression Enable HTTP (brotli) compression Prevent caching
   of objects after settings have been changed Remove query strings from static 
   resources Cache exception list: Do not set cookies for static files. Removes 
   the Set-Cookie header for responses. Do not process 404 errors for static objects
   with WordPress 404 Error Exception List Rewrite URL structure of objects
 *     ```
       4.2) CSS & JS
       ✓ Set Last-Modified header
       ✓ Set header expiration
       Header expiration: 15552000 seconds
       ✓ Set header control cache
       Cache control policy: cache with maximum time and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate"
       ✓ Set entity tag (eTag)
       ✓ Set the W3 full cache header
       ✓ Enable HTTP compression (gzip)
       Enable HTTP (brotli) compression
       Prevent caching of objects after settings have been changed
       Remove query strings from static resources
       Disable cookies for static files
       4.3) HTML & XML
       ✓ Set Last-Modified header
       ✓ Set header expiration
       Header expiration: 3550 seconds
       ✓ Set header control cache
       Cache control policy: cache with maximum time ("public, max-age=EXPIRES_SECONDS")
       ✓ Set Entity Tag (ETag)
       ✓ Set the W3 full cache header
       ✓ Enable HTTP compression (gzip)
       Enable HTTP (brotli) compression
       4.4) Media and Other Files
       ✓ Set Last-Modified header
       ✓ Set header expiration
       Header expiration: 15552000 seconds
       ✓ Set header control cache
       Cache control policy: cache with maximum time ("public, max-age=EXPIRES_SECONDS")
       ✓ Set Entity Tag (ETag)
       ✓ Set the W3 full cache header
       ✓ Enable HTTP compression (gzip)
       Enable HTTP (brotli) compression
       Prevent caching of objects after settings have been changed
       Remove query strings from static resources
       Disable cookies for static files
       ```
   
 * To finish a couple of things:
    a) Although (as you can see), I have GZip compression
   enabled (both through W3TC and from my own hosting) and, in online tools where
   I performed checks like this; [https://ibb.co/1QMRfYQ](https://ibb.co/1QMRfYQ)
   Everything indicates that I have everything compressed, according to Pingdom 
   Tools… [https://ibb.co/NpbHBWz](https://ibb.co/NpbHBWz) My site… Has 0 compression!
   Do you know what could be causing this? b) Just in case. Same goes for understanding
   brotli. That although, it does not have it enabled with you if it is with Cloudflare.
   Finally and, taking into account all the above… c) Do you have any idea if I’m
   doing something wrong? I await your comments. From already thank you very much.
   Greetings.
 *  Thread Starter [atutrabajo](https://wordpress.org/support/users/atutrabajo/)
 * (@atutrabajo)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/about-the-browser-cache/#post-15882280)
 * Another yes, I say.
    I forgot to tell you 2(two) things (in case you want to 
   incorporate them into your analysis of the case): 1) On my site, I have this 
   code installed in my function.php… /* 10) Remove unnecessary query tags from 
   scripts and style sheets in the header */ function _remove_script_version( $src){
   $parts = explode( ‘?’, $src ); return $parts[0]; } add_filter( ‘script_loader_src’,‘
   _remove_script_version’, 15, 1 ); add_filter( ‘style_loader_src’, ‘_remove_script_version’,
   15, 1 ); Which, you will surely realize, what it does is remove the versions 
   of the CSS and JS files. This is because I “hate” to see WordPress (or whoever)
   is adding versions to my files all the time. And because, as I could read somewhere,
   that helps to optimize (accelerate) my site. 2) In my Cloudflare I have… caching
   Setting Browser cache TTL: 6 months Which (as I also read out there), contributes
   to the speed of the site. Does it have something to do with the problem that 
   I raised? Thanks, again. Greetings.

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

The topic ‘About the browser cache’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [atutrabajo](https://wordpress.org/support/users/atutrabajo/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/about-the-browser-cache/#post-15882280)
 * Status: resolved