RE: [PHP] refreshing pages in the cache
| From: | Ross Hansen | Date: | Thu, 28 Apr 2011 02:27:52 +0000 |
| Subject: | RE: [PHP] refreshing pages in the cache | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-312529@lists.php.net to get a copy of this message | ||
You don't want to echo it as it isn't something that is going to HTML. it is native PHP.
the correct command should be
<? header("Cache-Control: no-cache");?>
See how this goes.
> To: php-general@lists.php.net
> From: jim.giner@albanyhandball.com
> Date: Wed, 27 Apr 2011 22:12:23 -0400
> Subject: Re: [PHP] refreshing pages in the cache
>
> Must be doing something wrong. Besides not helping my pages to re-build, it
> actually ruins the presentation of a couple of my pages, even tho they are
> all using the exact same includes with only some dummy content in one div
> different than all the other pages.
>
> I added this line to my existing "starter" page code:
>
> <? echo 'header("Cache-Control: no-cache")';?>
>
> the above lines were added just ahead of the following - which was the
> absolute first line of output generated by my "built page" - line 1 of my
> first included file:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>