Q:

ajax json object doesn't update in IE8

I'm working on a project with an heavy use of Ajax & Json and I tend to refresh the data every second. 
Everything works great, Json Parse works well in Google Chrome, but at IE8 my object does not updates from its initial state, forcing me to clear the browser cache in order to see the changes. 
With Chrome everything works as expected, changes are seen live. I tried both the native JSON.parse() and jQuery.parseJSON().
Would be glad to have some help with this to make the project run on IE just as good as on Chrome.
Here is this section of the code:
    function get_tables()
    {
       $.ajax(
       {
         url:  'index.php?a=1',
         type: 'GET',
         dataType: 'html',
         success: function(data){
            to_object = JSON.parse(
            console.log('requested');    
         },
       });
    }
setInterval(get_tables,1000);

Thanks in advance.

A:

You are making same request all the time, so it caches your request. You can disable caching in two way,
This will make cache false for all ajax requests
$(document).ready(function() {
  $.ajaxSetup({ cache: false });
});

or
This will disable cache for only this request
$.ajax(
{
 url:  'index.php?a=1',
 type: 'GET',
 dataType: 'html',
 success: function(data){
    to_object = JSON.parse(
    console.log('requested');    
 },
 cache: false
});

