Page 1 of 1

Updated Files - Advice Needed

Posted: Fri Jun 09, 2023 9:33 pm
by johnsmith0251
Hello there,

I'm responsible for managing a website with pages that need to be updated regularly. However, I've been getting feedback from some users that they are not able to see the updates immediately or are experiencing display issues.

I believe this might be due to caching at the device level. Has anyone else had this issue before? Is there a way to make sure that the updated page is always displayed correctly? Although having an outdated page is not a major concern, display issues can be problematic.

I've suggested to people to simply refresh the page, but unfortunately, that hasn't worked well. I've also mentioned clearing the cache, but not everyone knows what that means. It's not practical to reach out to every single visitor to the website.

I would greatly appreciate any suggestions on how to handle this situation.

Thank you.

Re: Updated Files - Advice Needed

Posted: Sat Jun 10, 2023 12:45 am
by BaconFries
For external css and javascript files you can use the "Cache Busting" feature in the software.
As of WB 16 See "Cache Busting"
viewtopic.php?p=447106#p447106

Some related information on cache issues.(external not of the software)
https://httpd.apache.org/docs/2.4/caching.html
https://stackoverflow.com/questions/136 ... r-php-site
https://developer.mozilla.org/en-US/doc ... patibility

Add the following between the meta tags

Code: Select all

<meta http-equiv=”cache-control” content=”max-age=0” />
<meta http-equiv=”cache-control” content=”no-cache” />
<meta http-equiv=”expires” content=”0” />
<meta http-equiv=”expires” content=”Tue, 01 Jan 1980 1:00:00 GMT” />
<meta http-equiv=”pragma” content=”no-cache” />
Using within a .htaccess file (server)

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>
Similar question and answer's
viewtopic.php?p=408655

Re: Updated Files - Advice Needed

Posted: Sat Jun 10, 2023 8:19 pm
by johnsmith0251
Ahhh! This was great! Thank you!!

I'm just trying to learn all of this so I appreciate your help. To clarify, when you mentioned "Some related information on cache issues." that was just to give more technical info as to what the "Cache Busting" feature corrects?

Also, as for the codes for the "meta tags" and .htaccess file. How is this different than the Cache Busting? Is this something that's been done a long with the Cache Busting feature, or an alternative choice to cache Busting?

Thanks for your help BaconFries!

BaconFries wrote: Sat Jun 10, 2023 12:45 am For external css and javascript files you can use the "Cache Busting" feature in the software.

Re: Updated Files - Advice Needed

Posted: Tue Jun 13, 2023 12:08 pm
by BaconFries
To clarify, when you mentioned "Some related information on cache issues." that was just to give more technical info as to what the "Cache Busting" feature corrects?
Correct.
Also, as for the codes for the "meta tags" and .htaccess file. How is this different than the Cache Busting? Is this something that's been done a long with the Cache Busting feature, or an alternative choice to cache Busting?
Cache busting feature is primary used for your external css and javascript/jquery files. Let's say you have the following
http://yoursiteurl.com/cssfile.css this could be the first version of the file uploaded to your server. You then update this within the program and again upload this to your server this now becomes http://yoursiteurl.com/cssfile.css?v=2 so now when the user visits your site they will pull this from the server instead of the previous version that may or will have been cached by the browser or local disk. It is technically meant to ensure that the latest version of the css or javascripts are used. Now this only applies to "External" files nor css or javascripts/jquery embedded in the page.

The two codes provided work along side the above mentioned so you can either decide to use within a .htaccess or insert ad meta tags

Re: Updated Files - Advice Needed

Posted: Tue Jun 13, 2023 3:27 pm
by johnsmith0251
thanks!!