Page 1 of 1

AJAX IE7 xmlhttp.status not changing when offline [SOLVED]

Posted: Wed Jun 06, 2007 6:11 am
by phpdevuk
so there I was writing a little ajax call to check if the internal server was online, and it never seemed to work in IE7, after an hour or so of going through every possible variable and adding try and catch statements to my code I found an article that said this
IE6 and IE7 use some agressive cache, that caches all the ajax. Essentially, if you update the inserted code, IE fails to use the new version, favouring the cache version every time.
essentially IE was caching the results from my script even when offline meaning it always thought it was online, adding a timestamp to the url that xmlhttp.open was calling solved the problem.

Thought I'd post it in case anyone else winds up pulling hair out trying to understand why an ajax call seems to be doing nothing ;)