PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Pragma: no-cache");
$mifichero = "C:\posicion.txt";
$posicion=array();
$referencia=array();
if ($mi_array=file($mifichero)) {
list ($linea, $contenido) = each ($mi_array);
}
echo $contenido;
?>
And I get a 5 seconds delay in the value of $contenido, no matter if I am on the server or in another country... And I am calling this function every second
Those two lines are telling the browser to not store static cached copies of the pages content on the client machine and every time the page loads, to load from the server instead of the local cache copy, I believe.
Everah wrote:Those two lines are telling the browser to not store static cached copies of the pages content on the client machine and every time the page loads, to load from the server instead of the local cache copy, I believe.
Everah wrote:Those two lines are telling the browser to not store static cached copies of the pages content on the client machine and every time the page loads, to load from the server instead of the local cache copy, I believe.
Whether they actually work or not is a matter of debate.
Everah wrote:Those two lines are telling the browser to not store static cached copies of the pages content on the client machine and every time the page loads, to load from the server instead of the local cache copy, I believe.
Whether they actually work or not is a matter of debate.
I guess you could try changing images' content (not changing their file names), and load the page again to see what happens...