Skip to content Skip to sidebar Skip to footer

Problem With Ie And Setinterval() Not Refreshing/updating

I'm using JavaScript/Jquery to make a page auto-update with a value from a database, although it doesn't seem to update in Internet Explorer. It works fine in FireFox & Chrome.

Solution 1:

Try disabling the cache with ajaxSetup

$.ajaxSetup ({
    // Disable caching of AJAX responses */cache: false
});

functionupdateComm() {  
 var url="commandSys.php";  
 jQuery("#theElement").load(url);  
}

setInterval(updateComm, 1000);

Alternatively, you can manually just append a +new Date to url so it appends a query string to prevent caching.

Alternatively, disable caching on the server-side.

Solution 2:

Your php page is cached. Has nothing to do with the interval. Set the right caching headers on the page.

Post a Comment for "Problem With Ie And Setinterval() Not Refreshing/updating"