NO-CACHE META TAG Ever wonder how you can prevent a browser from caching a content-sensitive page? Maybe you've got a password-protected file that you don't want someone to pull up after the permitted user has left their machine. Meta tags are the answer. Traditionally used to convey information about the site to indexing spiders and search engines, there are two flavors of Meta tags that can be used to stymie the caching of a web page.

The first uses a HTTP-EQUIV parameter type of Pragma to simply tell the browser not to cache the page altogether:

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

The second one specifies an expiration date date (like milk), after which the page will be removed from the cache:

<META HTTP-EQUIV="Expires" CONTENT="Sun, 04 Jul 1999 00:00:01 GMT">

(Note that the expiration date must be written in Greenwich Mean Time)


Can't find what you're looking for? E-mail Haznet.
Copyright © 1998 - 1999