Quick (hopefully) Webby Question
<div class="IPBDescription">re: caching and site updates</div> I just put together a quick photo blog type site, to encourage me to use my camera more often, and the way I have it working is basically that I update the index every time I put a new photo up, then archive older pictures (e.g. may22.html). The problem is that for some reason when I update the index then visit the page to test it, it shows me what is cached instead of the new index.
Is that a browser flaw, or can I set up my page/site such that each time the index is updated browsers will download the new one?
Is that a browser flaw, or can I set up my page/site such that each time the index is updated browsers will download the new one?
Comments
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
If you have no idea what this means and/or you are using a static site (i.e. hardcoded HTML pages), then:
a) If you use IE, go to Tools->Internet Options->Settings button and click the radio button that says 'Every visit to the page'
b) If you use Firefox, there is no similar option (that I know of), so just hold shift and click refresh.
[edit]
From my own experience, you may be able to get by with just <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->header("Cache-Control: no-cache");<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->[/edit]
a) If you use IE, go to Tools->Internet Options->Settings button and click the radio button that says 'Every visit to the page'
b) If you use Firefox, there is no similar option (that I know of), so just hold shift and click refresh.<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
It sounds like he is using a static site. He isn't worried about his own viewing, he wants to change how the site works for the people visiting it. Here's something I found from a google search:
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="expires" content="0">
The person posting it claimed that it works in IE and Firefox, and it will work for static pages.