Reputation: 169
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
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