Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a lightweight library I can use to ask users to download a modern browser?

I'm building a site that relies heavily on several HTML5 features. I do not want to develop a separate version of the site for IE6-8. Instead, when those users visit, I'd like a nice-looking modal to pop up to politely suggest that they visit the site with a modern browser like Chrome or Firefox. Is there an existing library that will do this for me?

Ideally, modern browsers would only have to download the browser detection code; the code powering the modal would be loaded asynchronously only when needed.

like image 903
Trevor Burnham Avatar asked Feb 23 '23 07:02

Trevor Burnham


2 Answers

Try this: http://www.ie6countdown.com/join-us.aspx

like image 123
Paul Avatar answered Feb 24 '23 22:02

Paul


Use Modernizr. Instead of checking what browser they use, you can check for the exact feature that you need and display an alert if the current browser does not support it. Additionally, Modernizr also includes the YepNope library which lets you conditionally load resources that you need (like the modal you mentioned)

like image 22
pradeek Avatar answered Feb 24 '23 20:02

pradeek