Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@appnest/upgrade-browser
Advanced tools
A simple customizable HTML file to show to users that should upgrade their browser
This repository contains a simple upgrade-browser.html
you can show to your visitors if their browser is not supported. The buttons and download links for the following browsers will be shown: "chrome", "edge", "firefox", "opera", "safari"
.
I recommend that you do some feature checking before showing the page. Here's an example of what you could do if you only wanted to supported browsers with support for CSS grids
and custom elements
.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Upgrade Browser (demo)</title>
</head>
<body>
<p>Only show this if CSS grids and custom elements are supported.</p>
<script type="text/javascript">
(function () {
var supportsGrid = ("grid-column" in document.documentElement.style || "msGridColumn" in document.documentElement.style);
var supportsCustomElements = ("customElements" in window);
var supported = supportsCustomElements && supportsGrid;
// Show the upgrade-browser dialog if the browser is not supported
if (!supported) {
window.location = "upgrade-browser.html?nofirefox&noopera";
}
})();
</script>
</body>
</html>
As seen in the above code at window.location = "upgrade-browser.html?nofirefox&noopera";
, the URL of the upgrade-browser.html
file may contain a query that specifies which browsers that should not be recommended to the users. You are able to specify the following fragments in the query.
You are also able to specify a title
, a subtitle
and a backgroundColor
as a hex without the #
.
...
window.location = "upgrade-browser.html?title=No Support&subtitle=Our app does not support your browser. Please install another&backgroundColor=000000";
...
Here's how that would look.
MIT license
FAQs
A simple customizable HTML file to show to users that should upgrade their browser
The npm package @appnest/upgrade-browser receives a total of 4 weekly downloads. As such, @appnest/upgrade-browser popularity was classified as not popular.
We found that @appnest/upgrade-browser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.