1.0.0 • Published 8 years ago

express-legacy-expires v1.0.0

Weekly downloads
60
License
MIT
Repository
github
Last release
8 years ago

express-legacy-expires

NPM version Build Status Coverage Status dependencies devDependencies

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());

License

MIT