Cache Busting

All WYSIWYG Web Builder support issues that are not covered in the forums below.
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
Post Reply
User avatar
Chris_t
 
 
Posts: 83
Joined: Thu Oct 27, 2016 7:39 pm

Cache Busting

Post by Chris_t »

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?
User avatar
Chris_t
 
 
Posts: 83
Joined: Thu Oct 27, 2016 7:39 pm

Re: Cache Busting

Post by Chris_t »

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?
User avatar
BaconFries
 
 
Posts: 5542
Joined: Thu Aug 16, 2007 7:32 pm

Re: Cache Busting

Post by BaconFries »

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" />
User avatar
Pablo
 
Posts: 22165
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Cache Busting

Post by Pablo »

Cache busting only works for external CSS files.
For HTML and inline CSS you can use the meta tags as suggested by BaconFries
User avatar
Chris_t
 
 
Posts: 83
Joined: Thu Oct 27, 2016 7:39 pm

Re: Cache Busting

Post by Chris_t »

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.
User avatar
ColinM
 
 
Posts: 917
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia

Re: Cache Busting

Post by ColinM »

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:

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>
I'd be interested to see if that works for you.
Yours truly
Colin M
Western Australia
User avatar
Chris_t
 
 
Posts: 83
Joined: Thu Oct 27, 2016 7:39 pm

Re: Cache Busting

Post by Chris_t »

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.
User avatar
ColinM
 
 
Posts: 917
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia

Re: Cache Busting

Post by ColinM »

You're welcome Chris 8)
Yours truly
Colin M
Western Australia
Post Reply