Hello everybody, I have written a webpage with some AJAX updates. What happens 1. DB updated 2. Every 10 seconds browser checks server for new information 3. In firefox new info is sent to the browser and end of story. HOWEVER 3. In IE7 the page does not refresh, I know this is because the GET url (post.php) is stored locally in IE's cache. If I delete all internet cache the page updates. But this is not really a suitable for my users/friends. What I'm asking is if there is anyway I can make post.php not be cached by IE? I have tried putting the following code in my post.php <head> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> </head> ... but that didn't work. I'm kinda of struggling. Any help would be hugely appreciated. Thanks
Just to let you know I have found the solution and it was pretty simple too. Change all xmlHttp.open("GET",url,true) to xmlHttp.open("POST",url,true) Seems to have fixed it for me. Hope it helps you all if you happen to have the same problem. Cheers Sanjay
You can also add a random number to the GET url, like that. var url = 'http://url.com/file.php?r='+ Math.floor(Math.random()*1000); Code (javascript):