Ask users to upgrade old browser
- Connect Middleware
- Old browsers are redirected to "Your browser is too old :(" page
- Configurable
- Inspired by Ruby-browser
- No support for minor browser versions
- All requests without user agent are just allowed
npm install oldbrowser
var oldbrowser = require('oldbrowser');
...
// Connect middleware
.use(oldbrowser())
var supportedBrowsers = {
'Chrome': 13,
'Firefox': 4,
'IE': 10,
'Opera': 15,
'Safari': 5
};
var options = {
browsers: {
'IE': 6 // It means that only IE >= 6 are allowed. All other browsers are denied
}
};
...
// Connect middleware
.use(oldbrowser(options))