meta (no cache)

liunx

Guest
First off, i apologize if this is the wrong forum. Since this is a meta tage issue, i figured maybe i should have put it with the "Search Engine" forum, but it's not actually a search engine thang.<br />
<br />
What i've got is a site (<!-- m --><a class="postlink" href="http://www.tecumsehreunion.f2s.com">http://www.tecumsehreunion.f2s.com</a><!-- m -->) with a lot of pages that are updated constantly. But people are always seeing stuff that's a week old.<br />
<br />
i've been using<br />
<META HTTP-EQUIV="no-cache" content="no-cache"><br />
to get browsers to stop displaying old news, but it's not working. Any suggestions? i don't want to use an expiration date, because this can cause spiders to dump your page from its search results. i've seen something before that was "revisit after" or something like that. What's that doing, and does it work any better? Should i use a combination of meta tags, and if so, which ones?<br />
<br />
Thanks...<!--content-->as far as I know my IE is setup to automatically check for new version of the page by default. unless the user changes this then it should always load the current version of the page.<br />
<br />
unless of course you don't update for weeks on end :)<!--content-->Now I'm no expert on all browsers out there... buuut... I do know that visitors using IE through AOL (don't hurt me for the profanity... please! ;) ) have to manually adjust for the browser to check for more recent copies of pages, other wise I recall that the default setting that way is like once a session, which is fine if the visitors are only coming in say once a day. However, if they visit, and then wander to other sites, then come back later in the day without closing and restarting their browser and there have been updates in between, then no, they won't see the changes.<br />
<br />
The other thing is that if the visitors are viewing yur page/site via a proxie there may well be delays, and maybe the cache tag thing would solve that... like I said, I'm no expert.<br />
<br />
I think maybe I'd track what browsers are being primarily used and whether visitors are viewing mostly via proxies, and see if this is really an issue or not.<br />
<br />
On the revisit meta tag, I believe thats more for search engines... I could be wrong, its been a long lifetime ;).<br />
<br />
Hope some of this helps...<!--content-->okay, but isn't that what the meta no-cache is for? to tell the browser to pull up the online version no matter what?<!--content-->actually I think you need to use a pragma directive to change the behavior of the food chain, I believe the correct no-cache tag is this:<br />
<br />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <br />
<br />
I'm not sure it works on all systems though, there might be some server side dependency since its effecting the request/response chain. Give it a try and see what happens.<br />
<br />
Kevin<!--content-->Hi, all.<br />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"><br />
This prevents caching on local machine ONLY when it is viewed over a SECURE connection (https). When this tag is used over a non-secure connection, the browser WILL cache the page and mark it to be immediately expired.<br />
<br />
If you have ASP, you can also use this:<br />
<% Response.CacheControl = "no-cache" %><br />
<% Response.AddHeader "Pragma", "no-cache" %><br />
<% Response.Expires = -1 %><!--content-->So (bear with me; i'm a moron) if i use<br />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <br />
on a non-secure web page, then people will see a non-cached version daily? Or just whenever the browser is set to check for an updated version?<br />
<br />
Thanks tremendously, whkoh!<!--content-->On a non-secure site, <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> will force the page to expire, hence causing the browser to refresh.<!--content-->I think the HTTPS problem was actually being called a bug. I seem to remember that from reading about pragma directives a while back. <br />
<br />
You will just have to give it a try transmothra, I'm not really sure how well integrated the pragma directives are into browsers and servers, and may vary from browser to broswer. Really old browsers will not support pragma directives at all but unless you really needed 100% compliance that shouldn't be a problem.<br />
<br />
Kevin<!--content-->I heard that f2s.com servers have a caching problem.<!--content-->:D they have more than a cache problem :D<!--content-->you can say that again!<!--content-->You start with META tags in the HEAD of the page. <br />
Not well supported by some browsers.<br />
<br />
The first instructs no caching:<br />
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache"><br />
<br />
The second is necessary because IE5 ignores the pragma:<br />
<br />
<META HTTP-EQUIV="Expires" CONTENT="-1"><br />
That expires the page as soon as it is born.<br />
<br />
However that may still not work in IE because it it is in the head where<br />
it has to be. In some kind of twisted logic IE sees the META tags, but <br />
because the page has not yet been loaded there is nothing to cache so it <br />
ignores it. Then when the page is loaded, it caches it. The solution <br />
from Micro$oft is to duplicate the tags after the end of the body. <br />
However they have to be in the head so you end up with this silly looking, <br />
but effective page setup:<br />
<br />
<HTML><br />
<HEAD><br />
<TITLE>---</TITLE><br />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"><br />
<META HTTP-EQUIV="Expires" CONTENT="-1"><br />
<br />
all the other head stuff<br />
<br />
</HEAD><br />
<BODY><br />
<br />
All the good stuff that makes the page worthwhile<br />
<br />
</BODY><br />
<HEAD><br />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"><br />
<META HTTP-EQUIV="Expires" CONTENT="-1"><br />
</HEAD><br />
</HTML><br />
<br />
<br />
<br />
For ASP if you want the same non-cache effect, here's the header <br />
information: <br />
<% Response.CacheControl = "no-cache" %>><br />
<% Response.AddHeader "Pragma", "no-cache" %> <br />
<% Response.Expires = -1 %><br />
<br />
I don't know if once does it for ASP or if you have to repeat <br />
that as well. <br />
<br />
<br />
And of course Netscrap always has to add a twist of its own. Pages <br />
with forms in Netscrap can be a problem especially for secure environments.<br />
<br />
Netscape suggests the following JavaScript be used in the BODY tag <br />
of all pages that should not be cached: <br />
<body onLoad="if ('Navigator' == navigator.appName) document.forms[0].reset();" <br />
<br />
With all of that there is still a small chance that there is still an <br />
unreported bug or a fringe browser that will screw up but this should <br />
be 99% effective.<br />
<br />
<br />
Using -1 as an expiry will cause most robots to ignore the tag.<br />
Cd&<!--content-->Originally posted by scoutt <br />
:D they have more than a cache problem :D <br />
<br />
and it is so confusing! :( but I can live with that :D<br />
<br />
They have their own web caching servers.<!--content-->Thanks, Dino!<!--content-->Glad it helped.<!--content-->
 
Back
Top