"Empty the browser's cache" - Can we trigger this command from the server ?

Joined
Apr 24, 2008
Messages
271
Reaction score
6
Points
18
Location
West of Paris
Your Mac's Specs
MacBookPro, iMac, OS 10.13.6, iPhone 6s iOS 15.1, iPad mini, iOS 9.3.5
I refer to an old fashioned bicycle club website, where webpages are hand written in pure html using a text editor.

<abeille-cyclotourisme.fr/>

To facilitate site management and navigation within the site, the structure of this website is such that page names are constant, while the content of the page changes over time. As an real-time example, one serie of monthly pages describes the bicycle club's monthly programs. Irrespective of the year, the july page's address is :

<http://www.abeille-cyclotourisme.fr/programmes/07_juillet.html/>

This page (named "07_juillet.html") is modified two times a year: in April where a preliminary program for july is posted and by end june when the final version of the July [2015] program is posted.

Problem. For some visitors, from time to time, their browser will lazily continue showing the old version of the page and not bother loading the new version of the page from the updated website. These visitors will [wrongly] believe the website was not updated. Apparently, emptying the browser's cache always does the trick of fixing the problem, but this fix must be done by the visitor, it relies on the visitor's browsing expertise, it is not directed on the server side.

Any reason for the cause of such a browser behavior ?

Any suggested more robust cure from the server side (by a script or otherwise) ?

Any suggestion to do away with the cache issue by altering the site's structure in such a way that the page name would effectively change two times a year (like "2015_2_07_juillet.html"), what about automagically changing all links (about 20 of them) pointing to the july page ?

Other suggestions ?

TIA. :)
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
I've seen this come up with testing pages (which is why I now test local web pages in a private window). Apparently, there are some meta tags that will disable caching of a page (although I've no idea if they work). See here. Now, one thing to note is that meta tags may not work across all browsers but comments in that thread suggest that the multiple tags provided as a solution are laid out as such to address cross-browser issues.
 
OP
michelangelo
Joined
Apr 24, 2008
Messages
271
Reaction score
6
Points
18
Location
West of Paris
Your Mac's Specs
MacBookPro, iMac, OS 10.13.6, iPhone 6s iOS 15.1, iPad mini, iOS 9.3.5
I've seen this come up with testing pages (which is why I now test local web pages in a private window). Apparently, there are some meta tags that will disable caching of a page (although I've no idea if they work). See here. Now, one thing to note is that meta tags may not work across all browsers but comments in that thread suggest that the multiple tags provided as a solution are laid out as such to address cross-browser issues.
Thanks, this is very helpful. I will use initially (but only in the pages that change from time to time) the following combo and see if it works over time.

<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />

Then, since the above may not help much but, when it does help, would add excessive server requests hence time baggage to visitors, I will, later on, use only the expire date, adjusted at each modification, to prevent unnecessary server requests.

<META HTTP-EQUIV="EXPIRES"
CONTENT="Fri, 01 Jul 2016 01:00:00 GMT">

(01:00:00 because most visitors are not from Greenwich but from France)

And see if it works.

:):):)
 
Last edited:
OP
michelangelo
Joined
Apr 24, 2008
Messages
271
Reaction score
6
Points
18
Location
West of Paris
Your Mac's Specs
MacBookPro, iMac, OS 10.13.6, iPhone 6s iOS 15.1, iPad mini, iOS 9.3.5
Then, since the above may not help much but, when it does help, would add excessive server requests hence time baggage to visitors, I will, later on, use only the expire date, adjusted at each modification, to prevent unnecessary server requests.

<META HTTP-EQUIV="EXPIRES"
CONTENT="Fri, 01 Jul 2016 01:00:00 GMT">

(01:00:00 because most visitors are not from Greenwich but from France)

And see if it works.

:):):)
The above is what I finally did on the website, mainly to minimize the potential for annoyance to the visitors, as reloading pages always take time and I know when I will update the page.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top