Redirect if IE 6

petewinter
petewinter used Ask the Experts™
on
Is there a way that I can redirect visitors to another web page if they are using IE 6?

Can you show me the sample code if there is. Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Javascript Developer
Top Expert 2008
Commented:
Try this
<script type="text/javascript">
 
var IE6=(navigator.userAgent.toLowerCase().indexOf('msie 6') != -1) && (navigator.userAgent.toLowerCase().indexOf('msie 7') == -1);
 
if (IE6) window.location="someOtherIE6page.html";
 
</script>

Open in new window

Author

Commented:
Perfect Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial