0

i have been testing a 'jquery' script that automatically updates a page every n seconds ,it works fine in all browsers except for internet explorer it doesn't load the page 'posts.php' and it doesn't show any errors code for reference

      $(document).ready(function() {
     $("#responsecontainer").load("posts.php");
   var refreshId = setInterval(function() {
      $("#responsecontainer").load('posts.php?randval='+ Math.random());
   }, 2000);
   $.ajaxSetup({ cache: false });
});
4

1 回答 1

0

我发现的许多网站都暗示IE可能正在缓存您的代码

  $("#responsecontainer").load("posts.php" + new Date().getTime());

试试这个..它可能会也可能不会解决问题,但会让我们知道缓存问题

有关更多信息,请参阅内容。

于 2013-08-18T19:36:12.103 回答