OsakaWebbie
Programmer
I have a periodic newsletter that I archive on my web site. I have a link (on the menu bar of all my pages) that points to a tiny html file that redirects the user immediately to whichever issue is the newest one (after they get there, I provide access to the rest of the back issues). The original version looked like this:
I have recently realized that I need to keep it from caching, or else even when I put a new issue up, any users who have used the link recently will still get taken to the previous issue. Based on advice found on the web, I added the following before the REFRESH line:
It works fine in Firefox, but not in IE. The rumored reason is that IE doesn't even consider whether to cache a page until the downloaded size reaches half of the 64kB buffer. The suggested solution is to add a second head tag at the end of the file with the no-cache command in it, but obviously that won't work for this, as this file is nowhere near 32kB; the caching happens only after it redirects and gets the newsletter content (and I don't think anything after the refresh command is processed anyway). It is apparently indexing the cached page as index.html, not od_0512.php, so changing the URL in the refresh command does not change which newsletter I see when coming from the menu link, unless I delete my cache first. I don't want to put the no-cache command in the newsletter file, because it's fine to be cached when requested by its real URL rather than through the redirect.
I also tried a different method of doing the redirect itself:
I can see some advantages to that method, but it didn't solve the IE cache problem.
Any ideas about how I can get that little file (that becomes big after the redirect) to not cache? Or even better, to cache the resultant newsletter content under the real filename of the content rather than index.html? I'm also open to other ideas about how to set this up (other than a dummy file to redirect) - I used to name the most recent newsletter index.php and then rename it when the next one came in, but I think that confuses search engines.
Code:
<html>
<head>
<title>Osaka Direct</title>
<meta http-equiv="REFRESH" content="0;url=od_0512.php" />
</head>
<body>
<p></p>
</body>
</html>
Code:
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
I also tried a different method of doing the redirect itself:
Code:
<script language="javascript"><!--
location.replace("od_0512.php")
//--></script>
Any ideas about how I can get that little file (that becomes big after the redirect) to not cache? Or even better, to cache the resultant newsletter content under the real filename of the content rather than index.html? I'm also open to other ideas about how to set this up (other than a dummy file to redirect) - I used to name the most recent newsletter index.php and then rename it when the next one came in, but I think that confuses search engines.