ChiWaiLi
ChiWaiLi

Reputation: 105

Browser support message pop up plugin

I know there are plugins like https://code.google.com/p/ie6-upgrade-warning/ and http://browser-update.org that are extremely handy to warn users to not use IE6/7.

But what if I would like to go a step further and customise the detection to say "Sorry, IE is not supported, Please download Chrome"? Are there such plugins out there? Thanks

Upvotes: 1

Views: 6019

Answers (2)

Sampson
Sampson

Reputation: 268354

Stack Overflow is a great place to get the answers you're looking for, but sometimes the answer you're looking for is not the answer you actually need. In this case, I must give you the later, since giving you the former would be a great disservice to you and your peers.

Do not attempt to detect a single browser, and funnel your traffic into another browser - it will be bad for business, bad for your career, and bad for the entire web as a whole. I mean no disrespect, I merely speak as somebody who has been observing the web for over a decade.

The users who are on Internet Explorer 6 today are not there because it's their favorite browser, so asking them to change is only going to frustrate them, and potentially drive them away from your site. More on this, and related points in Kyle Simpson's talk Browser Versions are Dead. As the well-known developer Nicholas Zakas said, It's time to stop blaming Internet Explorer.

As far as Internet Explorer in general, the latest installments are incredible. Internet Explorer 9 marked a radical change in the product, showing an increasing support for web standards. Internet Explorer 10 was released quickly thereafter (shattering the idea of a 2-year release cycle), and shows support for many "CSS3" features that not even Chrome yet supported.

The industry itself seems to be appreciating Internet Explorer today, including tech-giants Leo Laporte and Steve Gibson. Lea Verou (creator of Dabblet, Prism, and W3C Staff Member) has publicly stated that "IE was a crappy browser several versions ago. IE10 is actually very good, not just decent". Also it was announced that "jQuery 2.0 now has more patches and shims for Chrome, Safari, and Firefox than for Internet Explorer!"

I've found time and time again lately that when Internet Explorer 10 is rendering something incorrectly, it is by and large typically caused by a developer attempting some "clever trick" to detect Internet Explorer and serve up alternative content. One recent example was from a site attempting to deliver content only to IE7 and up, doing the following:

if ( $.browser.msie && $.browser.version.substr(0, 1) < 7 ) {
    /* Assume this is IE6 or below, and deliver substandard experience */
}

This little trick suggested version "10.0" was actually Internet Explorer 1, and delivered a horrible experience. Fixing this code, resulting in IE getting the same experience designed for Chrome, resulted in a restored site - everything just worked. This isn't uncommon today, it has happened over, and over again.

Rather than focusing on how you can get your visitors to install new software to view your website, focus instead on writing standards-based markup, using best-practices like progressive enhancement, feature-detection, polyfills when necessary, and be alright with your site gracefully degrading in older browsers. After all, your website doesn't need to look the same in every browser out there.

Lastly, the cost of testing Internet Explorer today has nearly vanished. Although it's not available on Mac, and older versions of Windows, every single version of Internet Explorer (6 through 10, Modern and Desktop) is available for use via BrowserStack (3 months free, courtesy of Microsoft), as well as via free downloadable virtual machines over at modern.IE. Not to mention the in-browser emulation, which excited Chris Coyier of CSS-Tricks.

With regards to the future of Internet Explorer, David Storey (recenty of Opera, and a W3C WG member) suggests it's looking very bright.

Upvotes: 12

apaul
apaul

Reputation: 16170

I wouldn't recommend an alert but I put one together anyway, just because I understand what drives a developer to this kind of thing... IE sucks less? really?

jsFiddle

Alert option

<!--[if IE]>
<script>alert("Sorry, IE is not supported, Please download Chrome");</script>
<![endif]-->

Less intrusive <div> option

    <!--[if IE]>
<div id="box">Sorry, IE is not supported, <a href="https://www.google.com/intl/en/chrome/browser/?hl=en&brand=CHMA&utm_campaign=en&utm_source=en-ha-na-us-bk&utm_medium=ha">Please download Chrome</a></div>
<![endif]-->

You can use the <!--[if IE]> for any content you would like to display only when a user views your page in IE, works for css work-arounds also.

Upvotes: 0

Related Questions