Page 1 of 1

how can i make a php page not be readed from cache?

Posted: Wed Aug 18, 2004 3:50 am
by pelegk2
i have a php page that i load into an iframe
and when i refresh it it idosent update~
how can i force it to reload the page but not from the cache?
i know there is a possibility like that in ASP
how can i do the same in php?
thnaks in advance
peleg

Posted: Wed Aug 18, 2004 4:01 am
by Grim...
Use this meta-tag in your <head>:

Code: Select all

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

Posted: Wed Aug 18, 2004 5:40 am
by pelegk2
thanks

Posted: Wed Aug 18, 2004 9:36 am
by pickle
In my experience, IE needs 3 of those types of tags to absolutely not cache a page. I also use header() as opposed to the meta tags:

Code: Select all

header("Cache-control: no-cache");
header("Expires: 0");
header("Pragma: no-cache");