Jump to content

Redirect Ie Users


Recommended Posts

I'm building a site and I don't care if IE users can see it properly (for now, maybe), but I'd like to tell them that they aren't going to see it properly unless they switch to a more compliant browser. Is there some kind of script I can put in my headers that will allow me to notify the user that he should switch from IE, and then if he wants, let him continue on to the site?

Link to comment
Share on other sites

Yes, and its probably easier than you think.


Depending on if you are using javascript or php or whatever, you basically just have the script check for which browser the user is using, and then you have a simple If/else check. If the browser is IE, show warning. Else show the normal page to everybody else.


You should be able to find a quick script that will get the browser name (depending on your scripting language), and then you can write the if/else test.

Link to comment
Share on other sites

A simple Javascript like

><script LANGUAGE = "JavaScript">
if (navigator.appName=='Microsoft Internet Explorer')

should work. Change the url to whatever page is ie only.


Insert the script between the <head> </head> tags

Edited by curtis
Link to comment
Share on other sites

Hey Tim, what a coincidence, I did exactly what you described in my site :)

If you visit http://borfast.com using IE, you will be redirected to http://borfast.com/msie, which warns you about IE's problems and that it may not work well with my site.


I used to use Gary White's PHP browser detection class embedded into every page of my site and recently, since I moved my site to Drupal, I made a Drupal module for it. :clapping:


Hope this helps! ;)

Edited by borfast
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...