par
Yopopipo » 11 févr. 2010, 16:49
YEEEEESSSSSSSSSSS !!!
Ca fonctionne,
c'était donc dû au cache.
Voilà donc ma fonction qui fonctionne:
Code : Tout sélectionner
function file(fichier)
{
xhr_object = getXMLHTTP();
xhr_object.open("GET", fichier + "&nocache=" + Math.random(), false);
xhr_object.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xhr_object.send(null);
if(xhr_object.readyState == 4) return(xhr_object.responseText);
}
J'avais pourtant lu les problemes dûs au cache, je le vidais donc comme ceci:
Code : Tout sélectionner
<?php
header("Expires: Mon, 17 Jul 1978 05:00:00 GMT");
header('Last-Modified: '.gmdate('D, d M Y H:i:s',time()).' GMT');
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
Mais il faut croire que c'etait insuffisant.
Merci encore !!
[color=#FF4040][size=150][b]YEEEEESSSSSSSSSSS !!![/b][/size][/color] :twisted:
Ca fonctionne,
c'était donc dû au cache.
Voilà donc ma fonction qui fonctionne:
[code]function file(fichier)
{
xhr_object = getXMLHTTP();
xhr_object.open("GET", fichier + "&nocache=" + Math.random(), false);
xhr_object.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xhr_object.send(null);
if(xhr_object.readyState == 4) return(xhr_object.responseText);
}[/code]
J'avais pourtant lu les problemes dûs au cache, je le vidais donc comme ceci:
[code]<?php
header("Expires: Mon, 17 Jul 1978 05:00:00 GMT");
header('Last-Modified: '.gmdate('D, d M Y H:i:s',time()).' GMT');
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
[/code]
Mais il faut croire que c'etait insuffisant.
Merci encore !!