Browser Detector

  • 1
  • Question
  • Updated 7 years ago
  • Answered
Hello,

Just droppin by like always for some help in a code I can't seem to find on the net- I thought google had everything- Maybe I'm just not searching the right thing. But anyway, I'm looking for a browser detector script.

What I mean, is when a user connects to my page the page scans his browser type (firefox, IE 7, IE 6, etc.) then, if internet explorer, then it redirects to a page like Yola has when a user tries to get on Yola.com with an old version of IE. That sais you need to update. Anyone?
Photo of Mike

Mike

  • 192 Posts
  • 4 Reply Likes

Posted 7 years ago

  • 1
Photo of Andi North, Mangopear Media

Andi North, Mangopear Media

  • 782 Posts
  • 111 Reply Likes
Hello Mike,

If you search on Google for "html code: IE6 redirect code" Here is a link to a search I have done, this will provide you with the relevant codes.

This is the code you will need: (without the first <!--- and the last one aswell).

<!---

<!--[if lte IE 6]>
<meta http-equiv="refresh" content="0; url=/ie6.html" />
<script type="text/javascript">
/* <![CDATA[ */
window.top.location = '/ie6.html';
/* ]]> */
</script>
<![endif]-->

--->

You can have different if statements here, lte means less than or equal to. IE 6 can be changed to IE 5.5, IE 6, IE 7, IE 8, IE 9.

lte can also be changed, you can research this online.

Hope this helps,

If you need anymore help please let me know,

Andi
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
Nice one Andi! Thanks :)
Photo of Andi North, Mangopear Media

Andi North, Mangopear Media

  • 782 Posts
  • 111 Reply Likes
No problem Emmy :)