I have web application and I do not really care about IE6 users. However I would like to have some kind of feature that would inform users that they are using IE6 and that their browser is not supported. I was thinking about two possible solutions:
- pop-out window (probably Javascript) with text informing the user on every page he visits
- some spe开发者_StackOverflowcial page with information, that user would be redirected to whenever he tries to access my application
Both solutions will be sufficient, however I would prefer the second one. Probably some magic javascript needs to be involved, can anyone could please provide a solution to this?
Help rid the world of IE6 with one line of javascript!
Update:
In case of IE6 users with JavaScript turned off, you can use a conditional comment. (graceful degradation)
<!--[if IE 6]>
<span> THIS WEBSITE DOES NOT SUPPORT Internet Explorer 6. PLEASE UPGRADE. </span>
<![endif]-->
(source: googlecode.com)
I would probably use a conditional comment to show a bar or a box in clear view of the user on the page. JavaScript/Meta redirection is usually rather annoying for everyone involved.
<!--[if IE 6]>
<div id="IE6Div">This Web Application does not support Internet Explorer 6.
Click <a href="/noIE6.htm">here</a> for more information.</div>
<![endif]-->
You can style it however you like then. I recommend a big bold bar at the top of your page that is stuck even when scrolling, turn off javascript and refresh a stack overflow page for an example.
If you're insistent on the JS method, try this script from Quirksmode for detecting the browser and the version, then use window.location.replace(newUrl)
for the redirection.
Redirect users to http://ie6funeral.com/.
I think this is a good solution: http://www.ie6update.com/
It shows IE6-visitors a message that looks like IE's own information Bart, but instead of offering an ActiveX plugin, it offers a browser update.
All you need to do is include a small piece of js-code in your site.
Use a conditional comment, that's usually the only thing these are used for anyways.
<!--[if lte IE 6]>
<SCRIPT LANGUAGE="Javascript">
window.location = 'new page';
</SCRIPT>
<![endif]-->
Of course I would not use JavaScript because if they have it disabled it won't do anything, I would use a meta refresh instead and put it in the head.
I would go with 2. Point is that you can optimize this page to show decently on IE 6 - and this is not a pop-out.
精彩评论