Skip to content

Instantly share code, notes, and snippets.

@fazlurr
Created August 1, 2016 04:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save fazlurr/59d16831ef59d59a8779d183c9ad5b06 to your computer and use it in GitHub Desktop.
Save fazlurr/59d16831ef59d59a8779d183c9ad5b06 to your computer and use it in GitHub Desktop.
No cache in Node.js Server - http://stackoverflow.com/a/30453242
// 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