Disable Cache in Ajax jQuery Response in IE

Solution for IE browser, not to loaded the data from Cache during ajax call.

I have came into a wired situation, where I made a call of jQuery Ajax post request and get loaded the fresh data in grid in success callback method. But updated data is not being reflected on the screen even saved in DB. This only happened in IE browser.

After research, I found that this issue happens because the IE loaded the data from it's cache.

Solution:

  1. $.ajaxSetup({   
  2.    // Disable caching of AJAX responses (Mostly issue exists for IE browser)   
  3.    cache: false   
  4. });  
Hope this will help you.