express-legacy-expires
v1.0.0
Published
ExpressJS middleware that automatically adds Expires headers for legacy browsers based on your Cache-Control headers.
Downloads
326
Maintainers
Readme
express-legacy-expires
Middleware for ExpressJS that automatically adds Expires headers for legacy browsers based on your Cache-Control headers.
Adding this middleware means you never need to define Expires headers for compatibility, you just set normal modern Cache-Control headers and a corresponding Expires header for older HTTP clients is automatically set.
This middleware doesn't help define Cache-Control, try combining it with express-cache-response-directive for that.
Install
$ npm install express-legacy-expires
Usage
var legacyExpires = require('express-legacy-expires');
app.use(legacyExpires());