note 15343 added to function.header
| From: | leingang at nospam dot math dot rutgers dot edu | Date: | Thu, 06 Sep 2001 11:59:42 +0000 |
| Subject: | note 15343 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17718@lists.php.net to get a copy of this message | ||
This has nothing to do with the header function, but people seem to have big concerns about how to
prevent pages from being cached. Another solution than the ones proposed is to add a random variable
to the URI so that it's always unique. This involves neither header information nor
<META> tags. Every time you print a link, do something like:
$nocache=md5(uniqid(time());
print("<a href=\"http://my.site.com/dynamic.php?nocache=$nocache\">My
Dynamic Page</a>");
You could even make the variable NAME random!
If you have a stock procedure for generating links which also keeps track of query information, than
it shouldn't be too hard to alter it this way.
http://www.php.net/manual/en/function.header.php