nadeemshafi9 Posted July 31, 2008 Share Posted July 31, 2008 hi guys i got my create httprequest object and execute settimout function to update live data, AFTER BODY or in the body onload because i know IE cant handle calls to non loaded tags. for some reason settimout works perfectly in Firefox but not in IE any ideass Quote Link to comment Share on other sites More sharing options...
rhodesa Posted July 31, 2008 Share Posted July 31, 2008 can you post some code or provide a link to an example? Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted August 4, 2008 Author Share Posted August 4, 2008 I first tried the following (which should disable browser caching): (in PHP) header( “Expires: Mon, 26 Jul 1997 05:00:00 GMT” ); header( “Last-Modified: ” . gmdate( “D, d M Y H:i:s” ) . ” GMT” ); header( “Cache-Control: no-cache, must-revalidate” ); header( “Pragma: no-cache” ); The data still did not change. I finally came to the following solutions: 1) use a POST request. When using with xmlhttprequest, it is slightly more complicated. 2) add a unique identifier to the end of my GET url. I choose #2. A unique Identifier can be created using the current data+time. Here is a simple way to generate this (in Javascript): var date = new Date(); var timestamp = date.getTime(); createXMLHttpRequest(); xmlHttp.onreadystatechange = handleMessages; xmlHttp.open(”GET”,”script.php?time=”+timestamp,true); xmlHttp.send(null); Quote Link to comment Share on other sites More sharing options...
rhodesa Posted August 11, 2008 Share Posted August 11, 2008 yeah, i usually use method #2 also....but that doesn't seem to relate to the original problem. is this topic resolved? Quote Link to comment Share on other sites More sharing options...
corbin Posted August 11, 2008 Share Posted August 11, 2008 Don't reuse the same AJAX object in IE. To put it simply, it doesn't work. Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted August 20, 2008 Author Share Posted August 20, 2008 i attatched the date/time in JAVASCRIPT to the url being repeatedly called it worked Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.