When updating the content of a text file, it does not update. Instead, I have to delete all cache and whatnot in my Google Chrome to make it refresh it. However, it does work when using a Apache server (local host).
I tried adding a: <meta http-equiv="expires" content="Mon, 26 Jul 1997 05:00:00 GMT"/> <meta http-equiv="pragma" content="no-cache" />
, but the problem still occurs.
function MakeRequest()
{
var xmlHttp = getXMLHttp(); // just a basic XML request
xmlHttp.onreadystatechange = function()
{
if(xmlHttp.readyState == 4)
{
HandleResponse(xmlHttp.responseText);
}
}
xmlHttp.open("GET", "counter.txt", true);
xmlHttp.send(null);
}
And I have another JavaScript just printing this in a div: (timed to run with some delay)
document.getElementById('counterHolder').innerHTML = response;