Only Allow Microsoft IE Browser To View Site - All Other Browsers Are Redirected

I

Information

I'm looking for a script that will check a visitors browser.

Now, I only want visitors using Microsoft InterNet Explorer to visit
existing URL and all other browsers will be redirected to another part
of my site.

I've checked a bunch of scripts but you have to identify every darn
browser available. All I want to do is check for any version of
Microsoft InterNet Explorer and redirect all other browsers to another
URL.

Any help would be greatly appreciated.

Thanks!
 
I

Ivo

Information said:
I'm looking for a script that will check a visitors browser.

Now, I only want visitors using Microsoft InterNet Explorer to visit
existing URL and all other browsers will be redirected to another part
of my site.

I've checked a bunch of scripts but you have to identify every darn
browser available. All I want to do is check for any version of
Microsoft InterNet Explorer and redirect all other browsers to another
URL.

Not true. Think the other way around, and redirect all IE browsers to a
dedicated page with a conditional comment, which is something that only IE
understands and is incidentally more politically correct:

<!--[if IE]>
<meta http-equiv="refresh"content="0;url=http://www.mysite.com/ieonly.htm">
<![endif]-->

All other browsers will treat this whole block as a HTML comment and ignore
it.
It goes without saying that it is always best to stay away from browser
sniffing scripts in general and those that read the user agent string in
particular as they are not reliable enough, and on the www one should really
not design for a specific browser to begin with.

HTH
 
R

RobG

Information said:
<!--[if IE]>
<meta http-equiv="refresh"content="0;url=http://www.mysite.com/ieonly.htm">
<![endif]-->

All other browsers will treat this whole block as a HTML comment and ignore
it.

SNIP

Works like a champ! Thanks for your help.

I presume that if the user has disabled "refresh" then it won't. And
given the annoyance caused by pages that refresh themselves, the number
of users with it disabled will grow.

You have no way of detecting it unless they take the time to e-mail you
and complain.
 
I

Information

RobG said:
Information said:
<!--[if IE]>
<meta http-equiv="refresh"content="0;url=http://www.mysite.com/ieonly.htm">
<![endif]-->

All other browsers will treat this whole block as a HTML comment and ignore
it.

SNIP

Works like a champ! Thanks for your help.

I presume that if the user has disabled "refresh" then it won't. And
given the annoyance caused by pages that refresh themselves, the number
of users with it disabled will grow.

You have no way of detecting it unless they take the time to e-mail you
and complain.

Well, we can only do our best to make our visitors comfortable. It is
very very unfortunate that different browsers handle html and java
differently.

Thanks!
 
M

Mark Preston

Got to say that I can't think why you would want to do that at all. It
makes things harder to maintain and seems to serve no useful purpose.
I'm sure you must have your reasons and admit that I'm curious - but its
none of my business.
Not true. Think the other way around, and redirect all IE browsers [snip]

<!--[if IE]>
<meta http-equiv="refresh"content="0;url=http://www.mysite.com/ieonly.htm">
<![endif]-->
Splendid tip - for the unimaginable case that you might need it.
 
I

Information

Mark Preston said:
Got to say that I can't think why you would want to do that at all. It
makes things harder to maintain and seems to serve no useful purpose.
I'm sure you must have your reasons and admit that I'm curious - but its
none of my business.
SNIP

Well, my son's website developer moved away and my son asked me to
pick up his site for now (my son owns a Comic Book store). The site
is stock full of java with all kind of neat stuff taking place on all
the pages. I was "fat and happy" with the updates and decided to take
a look at the site using NetScape 7x, Opera, Mozilla FireFox, Mozilla
Navigator, and NetScape 4x. Geeeez, everything looked perfect with IE
but was a total mess with most of the other browsers. I started to
play with the files and came close with all my test browsers but not
close enough for me! I decided that I would rather limit the viewing
for now (with an explanation to visitors using other browsers) while
redesigning the site so it is compatible with all browsers.

Hope I wasn't long winded on my explanation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top