Re: avoid cached html pages

From: Date: Thu, 18 Jan 2001 07:46:19 +0000
Subject: Re: avoid cached html pages
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-5942@lists.php.net to get a copy of this message
Lisa Elita wrote: > > Hi all, > > Can you tell me how to avoid cached HTML pages from showing up? How to set > expiry time to an HTML page? > > Joseph > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net Hi, If I understood well, you want to set up an expire time for HTML page you create using PHP. If so, you can use Header() function like this: Header("Expires: ".gmdate("D, d M Y H:i:s")." GMT"); // please consult gmdate() function for details // or you can put the date you want with the format shown Header("Pragma: no-cache"); // for HTTP/1.0 Anyway, be sure you send headers before any other action send to the browser. More detail about Header() function in PHP Manual --- HTTP Functions. Please excuse me if you knew those things before you ask. -- Adrian Turcu System Administrator Computers Department Romanian Railway Company Constanta Region E-mail: adrianturcu@yahoo.com, adi@cfrcta.ro Phone: +40 92 563791 (any time) +40 43 363977 (home)

« previous php.db (#5942) next »