using old exp date to refresh cache?

D

Developwebsites

Just got into an argument with one of them masters of synergism.

http://www.shorelinewebdesign.com

from source code:
<meta http-equiv="Expires" content="Mon, 06 Jan 1990 00:00:01 GMT">
<meta name="generator" content="Allaire HomeSite 4.0">

his explanation:
"The expired tag predated as it is, assures that a new page is sourced from the
server at each read request rather than from the users local cache."

what the hell is he talking about?
He uses the same tag in all of his sites in his portfolio.
 
J

Jukka K. Korpela

from source code:
<meta http-equiv="Expires" content="Mon, 06 Jan 1990 00:00:01 GMT">

It is an imitation of an HTTP header.
<meta name="generator" content="Allaire HomeSite 4.0">

Irrelevant. I wouldn't condemn a dog on <meta> tag extracts; HomeSite may
or may not be guilty of spitting out the header, but the author of the
page has the ultimate responsibility,
his explanation:
"The expired tag predated as it is, assures that a new page is
sourced from the server at each read request rather than from the
users local cache."

what the hell is he talking about?

It's common cargo cult nonsense. Actually somewhat worse than nonsense,
since the tag sometimes actually prevents caching, thereby causing
unnecessary network load. But it mainly harms the author's purposes only,
when visitors leave after realizing they have entered a World Wide Wait
area of the Web.

If _you_ want to know what's going on (he obviously doesn't), please
consult the oft-recommended caching tutorial
http://www.mnot.net/cache_docs/
 
C

Chris Morris


"As of the release of MSIE 4.01..."

Not that it was good advice when that page was written, but it's even
worse advice now.

"Note: It may be better to specify cache commands in HTTP than in META
statements, where they can influence more than the browser, but
proxies and other intermediaries that may cache information."

If one was to substitute 'may' for 'almost certainly, unless you are
attempting something very strange' then that would be about right.

Since lots of the caching on the web goes on in proxies, that's as
good a reason as any not to use meta for it, along with the fact that
anything in meta will get overridden by the real headers which most
servers send by default anyway.

Caching on the web generally doesn't last longer than a few days (as
caches have limited disk space and browsers recheck anyway after a
while) so it's not a problem for most pages. Rapidly updated pages can
benefit from setting *caching headers through HTTP* but far less (if
at all) from <meta>.

Imagine the likely situation:
Your server <------> ISP Caching Proxy <------> Browser

The browser notices that the page is expired according to its <meta>
information (assuming it's buggy enough to use that in preference to
the real HTTP headers) and asks for it again to see if it's updated.

The proxy notices it has one in its cache, and *it* only knows about
the HTTP headers. So since it's still up-to-date, it sends it back to
the browser.

There are ways around this with real HTTP headers for pages that
*actually* need cache avoidance, of course, but the vast majority of
pages don't.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top