Skip to content

Commit

Permalink
Adds a fix for excessive caching in IE 11 (adds additional Cache-Cont…
Browse files Browse the repository at this point in the history
…rol headers)
  • Loading branch information
johntron committed Feb 26, 2014
1 parent 2b81bfb commit 1538f7b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
module.exports = function(request) {
request.headers = {
'X-Requested-With': 'XMLHttpRequest',
'Cache-Control': 'no-cache'
};
module.exports = function (request) {
request.set('X-Requested-With', 'XMLHttpRequest');
request.set('Cache-Control', 'no-cache,no-store,must-revalidate,max-age=-1');
return request;
}
}
module.exports.with_query_strings = function(request) {
request._query = [Date.now().toString()]
return module.exports(request);
};

0 comments on commit 1538f7b

Please sign in to comment.