javascript - Angular.js ie ajax request issue -


i have problem angular.js ajax call ie. first time request, working (i result). when other ajax call (same request) without refreshing page, result same first call, if shouldn't same.

here's how request :

this.getemploye = function (isaftersave) {     $http({         url: 'contact.svc/getemployee',         method: "get"     }).success(function (data) {         //the data result same ie.     });  }; 

note have no problem chrome , firefox. version of ie 11.

ie aggressively cache ajax calls (actually pretty everything). need set cache options on http response headers servers.

you need add cache-control header ajax response sent server if not want cached.

cache-control: no-cache, no-store 

as measure should set cache:false in $http call

$http.get('https://api.myapp.com/someresource', { cache: false }); 

if haven't got access modify server append random query string onto url every time force ie re-issue request won't have seen url before.

this.getemploye = function (isaftersave) {     $http({         url: 'contact.svc/getemployee?nocache=' + new date().toisostring(),         method: "get"     }).success(function (data) {     });  }; 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -