How to add Cache-control header to $resource in AngularJS -
i trying bypass aggressive ie10 caching setting cache-control header of requests.
however, not seem have desired effect. below can find code use. names sanitised bit.
service.factory('service', ['$resource', function($resource) { return $resource(url + '/:year', {year : '@year'}, {'get': { headers : { 'cache-control': 'private, max-age=0, no-cache' } }}); } ]);
the suggested solutions did not me, give food thought. posting posterity config solved problem.
var config = { headers : { "pragma": "no-cache", "expires": -1, "cache-control": "no-cache" } };
Comments
Post a Comment