Click to See Complete Forum and Search --> : Help with updating my site on other people PCs


Babbler
04-05-2009, 11:18 AM
Hello all,

Reletively new to web development.

I have recently made changes to my website but unfortunatley everone who viwes it has it chached! So they dont see the latest version.

I have changed the pages to have the line:


META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE" within <> but obviously - as their local PC sees a cached version they always get that version!

Is there anything I can add to make their PC check for the latest version or is that impossible. I.E. got to the server and see the latest page rather than their chached version. Probably not possible is it? As their PC will never check for latest version unless they press ctrl+f5.

Can I maybe add a line that will run ctrl+f5 on every visit? But again that wont work as they have it chached so that line wont be in their local copy.

Complicated I know :(

Charles
04-05-2009, 05:35 PM
When someone directs a browser to your site, if the browser has a copy in its cache it is supposed to ask the server for some details so it can determine if it has the latest version. Somewhere along the way this process is getting mungled up. Something is deciding that your page is stable enough that they don't have to bother with the checking.

If you really want browsers to always download a copy of the file then you'll want to adjust the HTTP response headers not the document HEAD, nor the packet headers. (They really are trying to keep us confused.) All you really need to do is suppress the e-tag and/or give the page an expiration date sometime in the past. How you do that will depend upon your particular server. If you have PHP all you need to do is save your page with a PHP extension. And you'll just have to wait for all the cached copies out there to get flushed in their own time.

Babbler
04-06-2009, 12:23 AM
All you really need to do is suppress the e-tag and/or give the page an expiration date sometime in the past. How you do that will depend upon your particular server. If you have PHP all you need to do is save your page with a PHP extension. And you'll just have to wait for all the cached copies out there to get flushed in their own time.


Ok - thanks for the reply. Im really confused now. I put these lines in the head of the document:

<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Cache-Control" content="no-cache" />


what do I need to do to change the e-tag? Its an HTML page...

Sorry - as I say Im relitively new to this. I didnt want to link to my page as I dont think thats allowed...

Fang
04-06-2009, 04:19 AM
http://www.websiteoptimization.com/speed/tweak/cache/

Charles
04-06-2009, 07:01 AM
I wasn't writing about anything in your HTML document; I was writing about your server settings. Follow the link provided by Mr. Fang, above.