Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apostrophe-browser-support

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apostrophe-browser-support

Maintain the aesthetic of your website by restricting old browsers from seeing it.

  • 0.5.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
4
Weekly downloads
 
Created
Source

#apostrophe-browser-support ##Table of Contents

  • Intro
  • How to use it

##Intro apostrophe-browser-support accepts a blacklist and graylist from the user. These lists will be used to either entirely restrict a user from seeing the website or warn them when they log-on that they are using a browser that is not recommended by the website owner.

In modules of app.js:

'apostrophe-browser-support': {
	blacklist: [
		{ name: 'IE', version: 7, ignoreBelow: true }
	]
},

##How to use it ###Blacklisting
The blacklist is an array of browsers and browser versions that the website owner specifically does not want to see the website. All blacklisted browsers will be served a page telling them to update or install a new browser if they want to view the site.

In the example below, users with Internet Explorer 7 and older will be blocked from viewing the website:

'apostrophe-browser-support': {
	blacklist: [
		{ name: 'IE', version: 7}
	]
}

If you only want to block Internet Explorer 7:

'apostrophe-browser-support': {
	blacklist: [
		{ name: 'IE', version: 7, ignoreOlder: true }
	]
}

###Graylisting The graylist is an array browsers and browser version just like the blacklist. However, when a user logs on to the website with a browser and browser version in the graylist, the website will display a modal warning them that they are using an old browser and they should consider downloading a new one.

Graylists are also different than blacklists in that they do not display the modal for all browser versions older than the one specified by default.

In the example below, users with Internet Explorer 9 will see a modal warning them that their browser is old and they should update their browser:

'apostrophe-browser-support': {
	graylist: [
		{ name: 'IE', version: 9 }
	]
}

If you want to show the modal for Internet Explorer 9 and every version older than IE 9:

'apostrophe-browser-support': {
	graylist: [
		{ name: 'IE', version: 9, includeOlder: true }
	]
}

###Templates

FAQs

Package last updated on 14 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc