Created
August 1, 2016 04:31
-
-
Save fazlurr/59d16831ef59d59a8779d183c9ad5b06 to your computer and use it in GitHub Desktop.
No cache in Node.js Server - http://stackoverflow.com/a/30453242
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// var app = express() | |
app.use(function (req, res, next) { | |
res.header('Cache-Control', 'private, no-cache, no-store, must-revalidate'); | |
res.header('Expires', '-1'); | |
res.header('Pragma', 'no-cache'); | |
next() | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment