2

With Internet Explorer 10 removing the browser detection through markup, I need a new way to redirect users using Internet Explorer to a new page

I decided to use

<body>
<script type="text/javascript">
if (navigator.appName == 'Microsoft Internet Explorer')
   {

    self.location = "http://<url>"

   }
</script>

, but nothing is happening. I am sure that there is something little missing that I am not seeing right now.

1 Answers1

1

Use this instead:

window.location.href = "http://<url>";

And as Vucko suggested, here is a way to detect IE using jQuery.

And here is how Microsoft suggests you check for IE.

Community
  • 1
  • 1
Scott
  • 3,736
  • 2
  • 26
  • 44