Thank you for your suggestions. As I'm new to this problem of caching I'm stumped by simple things that to most people seems blatantly obvious.
Firstly, I don't have a problem myself with getting a server side version of a web page as I can use command-R when Chrome caches it. It is the visitors to the site I'm concerned about. As I have many images on my site I need to keep costs down by allowing as much caching as possible. So, what I need is a way to add something to a web page so that after I make an update to it this new version is read instead of the cached version. Can I do this in the HTML document without having to do anything on the server side? I'm advised meta tags are not reliable for this. HTTP headers seem to be the most recommended solution, but these recommendations never seem to come with enough instructions for newbies to be able to apply them. I can get to the apache .htaccess file but all the instructions I come across totally confuse me. What I'd like to be able to do is allow full caching for most of my site content but be able to arrange to have a select a few files not cacheable (sort of like setting a class in css). Is this possible? Specifically, I'd like to know what I'd have to put in an HTML doc header and what to put in the .htaccess file. Grateful for any help with this. > On 17 Jun 2021, at 08:31, Peter Small <[email protected]> wrote: >> Chrome keeps caching my files so that when I make a change to any online >> document Chrome displays the cached version and not the modified version >> that is on the server. > > Are you setting an expiration header on you site? This is normally how you > prevent caching. > > Also, I believe in Chrome (and other browsers) ⇧⌘-R or perhaps > ⌥⌘-R will reload the page from the server and not from cache. > > Or, you can go all in and add http headers: > > Cache-Control: no-cache, no-store, must-revalidate > Expires: 0 > > In Apache you would add this like so: > > <IfModule headers_module> > Header set Cache-Control "no-cache, no-store, must-revalidate" > Header set Expires "0" > </IfModule> > > > -- > "He is simply a shiver looking for a spine to run up." - Paul Keating > > -- > This is the BBEdit Talk public discussion group. If you have a feature > request or need technical support, please email "[email protected]" > rather than posting here. Follow @bbedit on Twitter: > <https://twitter.com/bbedit> > --- > You received this message because you are subscribed to the Google Groups > "BBEdit Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/bbedit/85A7EAF6-1AC3-4E76-8A3C-B315D7F4D069%40kreme.com. > -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "[email protected]" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/8eb5a184c60454658d486a9694212459.squirrel%40email.powweb.com.
