user2014175
user2014175

Reputation: 169

Script not working properly in IE 10

I'm using the following code to grab some data out of an SQL database. It works fine in all browsers, bar IE10. It updates once and then just holds onto the initial value. It doesn't change when the value in the database changes.

setInterval(function turkey () {

    jQuery('#lat_grabber').load('mapReloadLat.php');
    jQuery('#lng_grabber').load('mapReloadLong.php');

Upvotes: 0

Views: 316

Answers (1)

David MacCrimmon
David MacCrimmon

Reputation: 966

Your AJAX request is very likely getting serviced from the cache (you could use Fiddler to verify).

To workaround this, I'd change the load to a jQuery.ajax call, that way you can set the cache property to false.

jQuery.ajax({
    url: "mapReloadLat.php",
    cache: false,
    complete: function (data) {
        jQuery('#lat_grabber').html(data);
    }
});

Upvotes: 2

Related Questions