note 34434 deleted from function.header by alindeman

From: Date: Sun, 27 Jul 2003 02:49:01 +0000
Subject: note 34434 deleted from function.header by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-52733@lists.php.net to get a copy of this message
Note Submitter: aemege"@"somoschilenos.cl ---- Eliminemos el Cache I was using for NO CACHE the pages this header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); // HTTP/1.0 But it doesn´t WORK, so I read in a post that using the function time() it will work for NO CACHE the pages, you must to all yours links inclusive using header(Location: something like this echo "<a href='url.php?".time()."&var1=some&var2=some2'> ------------------------------------------------------- En español ahora, aqui se van a entender más fácil espero Intente de muchas maneras que el browser no almacenara las pagina en el cache, y funcionaba a medias es decir a veces igual las cargaba del cache, leyendo en alguna parte vi que agregando a la url el tiempo obtenido de la funcion time() la iba a actualizar a cada rato, ya que creo que se debe a que es un parametro nuevo cada vez, así que agregando time, nos ahorramos los header, y si funciona, quedando algo como: echo "<a href='la_url.php?'".time()."&variable=1515&otra=rer>" Lo anterior incluso funciona con Location del header osea algo asi: header("Location: http://$SERVER_NAME/algo.php?".time()."");

« previous php.notes (#52733) next »