Hello @poorjob
Thank you for your question and I am happy to asset you with this.
Yes, if the visitor refreshes the page after the cache is purged, they will be able to see the changes – no problem. The important is to note that the page needs to be refreshed, as browsing through pages means that you are still in the same session and in this case, the cache will expire only after one hour.
THanks!
Thread Starter
Anonymous User 20443167
(@anonymized-20443167)
Hello perfectly understood.
I don’t like this behavior. A previous visitor with a not expired cache may not see new content without pressing F5 (forcing refresh).
I’d like to have cached HTML until it changes, no expiration.
Is there any setting where the user will always ping the server for changes? And if no changes (304) use the local cache, if not redownload the page.
I’m thinking:
- Set Last-Modified header > ON (maybe un-needed?)
- Set expires header > OFF
- Set cache control header > OFF
- Set entity tag (ETag) > ON
The idea is the browser to always ping to compare ETag, if matches serve cache if not refresh. Would the settings above achieve that? if not what should i change? Thanks!!!
-
This reply was modified 1 year, 11 months ago by Anonymous User 20443167.
Hello @poorjob
Thank you for your feedback.
Yes, you should be using those settings you provided in this case.
Thanks!
Thread Starter
Anonymous User 20443167
(@anonymized-20443167)
Hello again, sorry for reviving this.
But i tested on Chrome, Firefox and GTmetrix.
There is no etag for the html document. It works for static assets like images and css.
I have selected:
“Set entity tag (ETag)
Set the ETag header to encourage browser caching of files.”
For HTML & XML. And also on “General” of the browser settings.
But the etag header doesn’t get added to html (home page and single posts).
Version 2.2.12
Please try and see if you can reproduce. Thanks!
Thread Starter
Anonymous User 20443167
(@anonymized-20443167)
Solved!
Cloudflare was deleting etag from HTML! >:(
https://support.cloudflare.com/hc/en-us/articles/218505467-Using-ETag-Headers-with-Cloudflare
In my case i had to disable “Automatic HTTPS Rewrites”
Others might also need to disable:
- Rocket Loader
- Minification
- Email Obfuscation
- Railgun (doesn’t seem to exist any more, still in documentation)
Closing for good now.