I have been looking around and cannot find what I am looking for
I want to display a warning to IE users that my website does not support IE nor will it ever try to and that you should get a better browser.
How you detect IE is really all I need but it would be nice if someone told me how to trigger a lightbox on the page but I can do that myself if you don't include it
Thank's for the help!
To detect whether the current browser is Internet Explorer, you can make use of the navigator. userAgent property. The userAgent property returns the value of the user-agent header sent by the browser to the server. It contains information about the name, version, and platform of the browser.
This method allows you to use simple code in your HTML to detect Internet Explorer (IE). You can determine whether or not the end user is using IE, and if so, which version. This allows you to provide content based on which browser is being used.
Use !( window. ActiveXObject) && "ActiveXObject" in window to detect IE11 explicitly. To detect any IE (pre-Edge, "Trident") version, use "ActiveXObject" in window instead.
Conditional HTML comments will work for detecting IE9 or less. From the HTML5 Boilerplate, which I highly suggest you use:
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With