Despite using external CSS files and having cache busting switched on, I find that users who have visited the changed pages previously (including myself) are finding the latest additions to a page all squashed up toward the top of the page overlayed on one another. An ordinary refresh does nothing but a hard page refresh does work. This doesn't seem to be able to be done on a mobile phone so the page continues to be displayed wrong.
Am I missing something about Cache Busting or are there situations where it doesn't work?
Cache Busting
Forum rules
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Re: Cache Busting
apart from the obvious changes to the CSS file because of the changes to the page is there something to tell the browser that it should re-read the new CSS file rather than its cached version?
- BaconFries
-
- Posts: 5619
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Cache Busting
Do you have a url to show what is wrong? You can add the following code using Page Properties and inserting into Meta Tags>Meta Tags>User Define
Code: Select all
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
Re: Cache Busting
Cache busting only works for external CSS files.
For HTML and inline CSS you can use the meta tags as suggested by BaconFries
For HTML and inline CSS you can use the meta tags as suggested by BaconFries
Re: Cache Busting
Pablo: Thanks for your reply. As I said in my original post I am using external CSS files and the cache busting setting doesn't work for me.
Baconfries: Thanks for your reply. Giving you a URL won't be much help because you will not have visited the page before so the page will work OK. However, I think following on from what Pablo says I will abandon external CSS files and have internal CSS and use the code you posted.
Baconfries: Thanks for your reply. Giving you a URL won't be much help because you will not have visited the page before so the page will work OK. However, I think following on from what Pablo says I will abandon external CSS files and have internal CSS and use the code you posted.
Re: Cache Busting
Hi Chris,
As you say, cache tags inside the page may only work if the page is loaded for the first time with those Cache tags that BC advised on.
You could try and place a .htaccess file in the root directory of your website as follows:
I'd be interested to see if that works for you.
As you say, cache tags inside the page may only work if the page is loaded for the first time with those Cache tags that BC advised on.
You could try and place a .htaccess file in the root directory of your website as follows:
Code: Select all
# DISABLE CACHING
<IfModule mod_headers.c>
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires 0
</IfModule>
Yours truly
Colin M
Western Australia
Colin M
Western Australia
Re: Cache Busting
Thanks Colin. As I mentioned in my reply I was going to try abandoning external CSS files and have the CSS embedded in the page and use BaconFries code to see if it worked. I am happy to say that it does seem to have solved the problem. Thanks BaconFries!
I will keep your suggestion on file as who knows, it might come in handy.
It's just a pity that the Cache Busting setting doesn't seem to work with external CSS files as it supposed to.
I will keep your suggestion on file as who knows, it might come in handy.
It's just a pity that the Cache Busting setting doesn't seem to work with external CSS files as it supposed to.