PDA

View Full Version : defating caching


Himself
04-19-2001, 09:59 PM
Anyone know how to defeat caching - both on the server, and locally on user's browsers? I'm using the following methods in PHP, and HTML, but they don't seem to b working:

------------
PHP:
------------
<?php header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");


------------
HTML:
------------
<META HTTP-EQUIV="Expires" CONTENT="0">



Let me if there's another way or where I'm messing up.

Thanks in advance.

- Himself

entropy
04-19-2001, 10:10 PM
Place the following line in your HTML page:

<meta http-equiv="Pragma" content="no-cache">

Just before the <head> tag. This instructs the browser not to cache the page.

Walt

Himself
04-19-2001, 10:16 PM
thanx entropy.

Do u know if this works for just defeating caching on the users browser, or also across proxy servers?

entropy
04-19-2001, 10:32 PM
There is a really great tutorial on browser and proxy caching at:

http://www.mnot.net/cache_docs/

Walt

Himself
04-20-2001, 01:30 AM
NICE!
thanx again.