[WEB4LIB] Is there a way to prevent web pages from being cached?
Thomas Dowling
tdowling at ohiolink.edu
Fri Nov 16 11:27:14 EST 2001
>
> I'm trying to use a redirect page that points to the current edition of
a report
> that is published twice weekly. This so I don't have to change the
actual url
> which is found in several places on my site. The problem is, since the
page
> that redirects gets cached, even though I've updated the url to redirect
to, it
> still redirects to the older report.
>
Sure, with the caveat that non-compliant or ill-behaved browsers are
outside your control. You might actually want to do something at the
server level so that the same URL consistently reaches whatever the
current issue is. That way, there won't be Google search results titled
"latest issue" that actually take people to back issues. The simplest way
to do that is probably with a symbolic link from "current.html" to
"whatever-is-really-current.html".
The solution to the cache problem has to lie in HTTP headers. You could
put these into HTML pages with a "<meta http-equiv=...>" tag; that may
work for browsers, but not for intermediary caches at company firewalls,
ISP proxies, etc. Configure your server to send the header
"Cache-control: no-cache". You may need to add a second header of
"Pragma: no-cache" to get anyone who is still talking HTTP 1.0.
Thomas Dowling
OhioLINK - Ohio Library and Information Network
tdowling at ohiolink.edu
More information about the Web4lib
mailing list