
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
browser-dead
Advanced tools
Inform users that their browser is unsupported by your website
npm i --save browser-dead
Download browser-dead.min.js and place it in appropriate directory of your choice.
wget "https://raw.githubusercontent.com/techgaun/browser-dead/master/dist/browser-dead.min.js" -O browser-dead.min.js
Include the script in your html:
<script src="/path/to/browser-dead.min.js" charset="utf-8"></script>
Download browser-dead.min.css and place it in appropriate directory of your choice.
wget https://raw.githubusercontent.com/techgaun/browser-dead/master/dist/css/browser-dead.min.css -O browser-dead.min.css
Include the stylesheet in your html:
<link rel="stylesheet" href="/path/to/browser-dead.min.css" media="screen">
Add a html element with content inside it as you wish.
<div id="browser-dead">
Unsupported browser
</div>
If using the node module, in your source files, import the browser-dead
module and then initialize as below:
import browserDead from 'browser-dead'
browserDead({
background: #f00,
color: #fff,
supportBreakpoint: 'promise',
browserDead: 'browser-dead'
})
If directly using in html, place the initialization code right below the script tag:
<script src="/path/to/browser-dead.min.js" charset="utf-8"></script>
<script type="text/javascript">
browserDead({
background: #f00,
color: #fff,
supportBreakpoint: 'promise',
browserDead: 'browser-dead'
})
</script>
Refer to caniuse.com to know what support breakpoint can you use for your scenario. Below are some of the common ones that you can use as breakpoints to not support your choices of browsers:
promise
(<= IE11) - Promise check is a special implementation in browser-dead which is useful for detecting IE11 properly if you do not wish to support IE11 and below.transform
(<= IE8) - CSS transformborderImage
(<= IE10) - CSS Border ImageborderSpacing
(<= IE7) - CSS Border Spacingnpm i
npm run dev
http://localhost:3000/examples/
and see what they do with your changesAlso, feel free to contribute by providing more breakpoints.
FAQs
Identify old and unsupported browsers simple easy way
The npm package browser-dead receives a total of 0 weekly downloads. As such, browser-dead popularity was classified as not popular.
We found that browser-dead demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.