Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

old-ie-checker

Code snippet to inject into your site to tell users on older IE browsers to update. Just copy & paste the script into your website, and it'll do the rest for you.

Add it into your site via <script async>var ua = navigator.userAgent.toLowerCase(), oldIe = '<div id="old-ie-user" style="background:#000;padding:10px;color:#fff"><p style="max-width:1000px;margin:auto">We see you&rsquo;re using an older version of your web browser, Internet Explorer. We suggest <a href="https://www.microsoft.com/en-us/download/internet-explorer.aspx" target="_blank">upgrading to the latest version</a> today. Browsing the web in this version is not as safe as a more modern browser, and you might be vulnerable to phising attacks or worse. We also suggest downloading and using <a href="https://www.google.com/chrome/browser/" target="_blank">Google Chrome</a> instead.</p></div>', body = document.body; function insertIE() { body.insertAdjacentHTML('afterbegin', oldIe); } if (ua.indexOf('msie') !== -1) insertIE();</script>.

About

Let users on older IE (10 or less) know their browser sucks: it's polite.

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.