All the ajax calls that are sent from the IE are cached by Angular and I get a 304 response
for all the subsequent calls . Though the request is the same, the response is not gonna be the same in my case. I wanna disable this cache. I tried adding the cache attribute
to $http.get but still it didnt help. How can this issue be resolved?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
Always use a simple approach add Timestamp with each request no need to clear cache
I just added this to View and it started working on IE. Confirmed to work on Angular 2.
also you can try in your servce to set headers like for example:
I have found better solution: Better Way to Prevent IE Cache in AngularJS?
For lazy ones here is a solution:
The guaranteed one that I had working was something along these lines:
I had to merge 2 of the above solutions in order to guarantee the correct usage for all methods, but you can replace
common
withget
or other method i.e.put
,post
,delete
to make this work for different cases.