My site ( http://www.kryptenx.com ) has a random jokes and a blog section, but usually the cache will store these and not update until I use control+F5. Is there a way to disable the caching of that page, by serverside, so that every visitor will reload the page everytime they come.
Index is split into 4 sections, 2 which I don't want cached(jokes + blog), and 2 which i do(header / footer)
nmluan
02-21-2004, 01:38 PM
Quick fix for IE:
<meta http-equiv="expires" content="0" />
You can search for more to work with Netscape and other browser.
Here is a good link
http://www.htmlgoodies.com/beyond/nocache.html
Thanks for the link, unfortunately I am unable to get it working =X
Actually, it does work if I upload it into a new directory and run it alone, but not when used with the include function onto my index.
Is there a way to make it function properly when included? I want to images to be cached, but not the jokes/blog.
Informity
02-21-2004, 06:53 PM
Let me guess... you use an ISP like ntl who force proxy caches down their users' necks?
I don't think there is an easy way around this - ntl's proxies misbehave often and ignore it when you tell them not to cache pages.
You could try modifying the headers (google for headers to set to stop caching) and add them as header("content"); at the top of the script
Corey Bryant
02-22-2004, 10:02 AM
Are you using ASP or HTML?
If is is just HTML, check out: http://www.htmlgoodies.com/beyond/nocache.html for some information.
EagleImagery
02-22-2004, 10:41 AM
_
If it's ASP...whack this at the beginning of your HEAD section
<% Response.ExpiresAbsolute = Now() - 1 Response.Expires = 0
Response.CacheControl = "no-cache" %>
:)
gordonw
02-22-2004, 11:11 AM
Expires
This tells the browser the date and time when the document will be considered "expired." If a user is using Netscape Navigator, a request for a document whose time has "expired" will initiate a new network request for the document. An illegal Expires date such as "0" is interpreted by the browser as "immediately." Dates must be in the RFC850 format, (GMT format):
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
Pragma
This is another way to control browser caching. To use this tag, the value must be "no-cache". When this is included in a document, it prevents Netscape Navigator from caching a page locally.
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
Not my words - full article at webdeveloper.com
Informity
02-22-2004, 01:21 PM
I think the issue here is NOT browser caching but proxy caching.
I'm using HTML/PHP, and I don't think my host is forcing a cache, because at http://www.kryptenx.com/TEST/jokes.php the jokes will not cache, but when inside the include tag they will cache.