angularjs - How to disable caching of AJAX requests in Angular in IE -
i have angular application makes http calls server. works fine on chrome & firefox. however, figured out ie caches response, , after post, need call same request , new updated response ie caches it. want disable caching ie. tried using
'if-none-match': '*' request header on calls, disables caching everything. there way conditionally ie only? or there way disable it?
html
<meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="sat, 01 dec 2001 00:00:00 gmt"> or
js
if (!$httpprovider.defaults.headers.get) { $httpprovider.defaults.headers.common = {}; } $httpprovider.defaults.headers.common["cache-control"] = "no-cache"; $httpprovider.defaults.headers.common.pragma = "no-cache"; $httpprovider.defaults.headers.common["if-modified-since"] = "0";
Comments
Post a Comment