Skip to content

ExpressJS middleware that automatically adds Expires headers for legacy browsers based on your Cache-Control headers.

License

Notifications You must be signed in to change notification settings

dantman/express-legacy-expires

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

ExpressJS middleware that automatically adds Expires headers for legacy browsers based on your Cache-Control headers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published