oldbrowser
Connect middleware for restrict old browsers
Last updated 8 years ago by vmakhaev .
Repository · Original npm · Tarball · package.json
$ cnpm install oldbrowser 
SYNC missed versions from official npm registry.

Old Browser

Ask users to upgrade old browser

alt tag

  • Connect Middleware
  • Old browsers are redirected to "Your browser too old :(" page
  • Configurable
  • Inspired by Ruby-browser

Known Issues

  • No support for minor browser versions
  • All requests without user agent are just allowed

Installation

npm install oldbrowser

Sample

var oldbrowser = require('oldbrowser');

...
  // Connect middleware
  .use(oldbrowser())

Defaults are:

var supportedBrowsers = {
  'Chrome': 13,
  'Firefox': 4,
  'IE': 10,
  'Opera': 15,
  'Safari': 5
};

If you want to overwrite:

var options = {
  browsers: {
    'IE': 6 // It means that only IE >= 6 are allowed. All other browsers are denied
  }
};

...
  // Connect middleware
  .use(oldbrowser(options))

Current Tags

  • 0.0.1                                ...           latest (8 years ago)

1 Versions

  • 0.0.1                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2021 © npmmirror.com |