Hi I have below JavaScript on a php file and it works great on firefox but not in IE8 i found the problem and it was due to caching. at first time page load IE cache php file and showing cached php file on intervals <?php print <<<HERE <script type="text/javascript"> $(document).ready(function() { $("#loader").load("content.php?uname=$uname"); var refreshId = setInterval(function() { $("#loader").load("content.php?uname=$uname"); }, 5000); }); </script> HERE; ?> <div id="loader"></div> Code (markup): is there way to prevent cache with the page or JavaScript? or a better JavaScript to do the same thing which compatible with IE Any help would be great and sorry for language errors Thanks
make sure you sending right http headers to prevent client caching ... or (quick and dirty) add random param value to the URL.
You can try Adding this line to Html file <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> I think it needs to be added twice, before <body>and after</body> Both time inside head tag.