title: Jquery SetInterval Not Working Correctly in Chrome and IE but is fine in FireFox
body: <p>I have jquery/javascript below that works fine in FireFox but doesn't really work well in Chrome and IE</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          (function($) {
           $(document).ready(function() {
               setInterval(function() {
                  $.ajax({
                      type: 'GET',
                      url: "/items/xml/?page={{ pageNo }}",
                      dataType: 'html',
                      success: function(html, textStatus) {
                          $('table.items').replaceWith(html);
                      },
                      error: function(xhr, textStatus, errorThrown) {
                          if (xhr.status != 0)
                          {
                          $('table.items').replaceWith("&lt;p /&gt;An error occurred: " + ( errorThrown ? errorThrown : xhr.status ));
                          }
                      }
                  });
               }, 1000);
               });
           })(jQuery);
      &lt;/script&gt;
  </code></pre>
  
  <p>I updated jquery version. It is v1.10.2 like I seen suggested on another question.
  Sadly this didn't work. Chrome will work the most of the time but there is times where it doesn't work at all same with IE and it is really slow.</p>
  
  <p>Does it have do with my code or it's problem in Chrome and IE? since FireFox is fine.</p>
  
  <p>EDIT:</p>
  
  <p>I should been clear the code is refreshing to update the page to see the changes could been made in the Database. Ie a new item has been added and this code it make sure it's seen as soon as it's refreshes without making someone having press F5 or reloading the page. 
  I mean it just stays saying it's loading information to page in chrome but most of time displays no information about items on the page or really slow in doing so. Same with IE. Again no problem in FireFox.  </p>