homepage Welcome to WebmasterWorld Guest from 54.226.21.57
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Redirect for Internet Explorer Users.
shree49

5+ Year Member



 
Msg#: 3528703 posted 11:44 pm on Dec 15, 2007 (gmt 0)

Hi everyone,
Can I have the HTML Codes for redirecting the site to a different page, if someone is using Internet Explorer?

I dont want Internet Explorer to be used to view my website. But I am an accountant, so I dont know how to do that.
Please please help me.

Thank You,
Jayshree

 

lavazza

5+ Year Member



 
Msg#: 3528703 posted 12:22 am on Dec 16, 2007 (gmt 0)

But I am an accountant, so I dont know how to do that.

Good :)

I suggest that, before you learn how to code, you take a little time to learn about accessibility, platform (in)dependence and cross-browser (in)compatability

In particular, note that 'browsers' are also known as 'user agents', primarily because they belong to the user

Mozilla.org: Target the standards and not particular browsers [developer.mozilla.org]

While the period from 1994-2000 was dominated by incompatible non-standard browsers from Netscape and Microsoft, today the dominating factor in web development are the standards proposed by the World Wide Web Consortium (W3C). Standards are important for web developers due to the increased flexibility, power of presentation, support for users with disabilities to name just a few reasons. Targeting your web content to particular vendors ignores the possibility that other browsers which support the same standards may be introduced in the future.

shree49

5+ Year Member



 
Msg#: 3528703 posted 12:47 am on Dec 16, 2007 (gmt 0)

I am waiting to finish my CPA, then I am definitely going for a Web Designing Class :) I know, I need that badly.

But presently I m in urgent need to now to allow Internet Explorer to be used for my site. It can have the add-on to directly download the music content with single click, which Firefox is not allowing at this moment.

It would be great if someone can help me getting the HTML codes and direct me where to add them on my site (its basically a wordpress blog) so that Internet Explorer user can be forced to use Firefox.

jdMorgan

WebmasterWorld Senior Member jdmorgan us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3528703 posted 3:43 am on Dec 16, 2007 (gmt 0)

To play the devil's advocate here, and to illustrate the point, I will visit your site using IE7, but I shall change the user-agent string to indicate
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 (shree49 edition)"
before downloading your files. It's fairly easy to do, so be sure to look for it on your logs.

What the folks here are trying to tell you is that you are asking how to implement the wrong specific solution to your problem... Among other reasons, you can't force people to change browsers, they'll just leave your site and not come back. Blocking IE, you'll likely lose 75% of your potential revenue; Is that not a concern?

Best,
Jim

shree49

5+ Year Member



 
Msg#: 3528703 posted 3:58 am on Dec 16, 2007 (gmt 0)

I am not earning anything from my site. Its just a hobby. I am not selling music from my site. Its just online streaming. And just a normal user of my site doesn't know how to get that on computer, but this new possible add-on for IE can download everything in one click.

anjanesh

10+ Year Member



 
Msg#: 3528703 posted 3:59 am on Dec 16, 2007 (gmt 0)

Use JavaScript to do the redirection.
Its quite a bit to code, but there are tons of examples on the net.
What your looking for is navigator.userAgent

<html>
<head>
<title>my Page</title>
<script language="JavaScript">
alert(navigator.userAgent);
alert(navigator.appName);
</script>
</head>
<body>
<center>My Site</center>
</body>
</html>

Check out these 2 links :
[quirksmode.org...]
[faqts.com...]

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3528703 posted 4:48 am on Dec 16, 2007 (gmt 0)

jdMorgan's point still remains - are you willing to throw away all your IE user traffic because a few may have this particular add-on?

anjanesh

10+ Year Member



 
Msg#: 3528703 posted 5:55 am on Dec 16, 2007 (gmt 0)

The OP states clearly
Can I have the HTML Codes for redirecting the site to a different page, if someone is using Internet Explorer?

"redirecting the site to a different page"
He wants to redirect to a IE-only page for IE users, but use default page for Gecko/Netscape/etc browsers.

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3528703 posted 6:28 am on Dec 16, 2007 (gmt 0)

Yes, and that cannot be done with html alone - hence the challenges in trying to really help the opening poster who admits to not knowing web development. It can be done on the client side using javascript user agent detection, as your post above has indicated. In fact, to send all MSIE users to newurl.html the javascript could be a rather simple script added to each page right below the <body> tag:

<script type="text/javascript>
if(navigator.userAgent.indexOf('MSIE')!=-1){location.replace('newurl.html')}
</script>

However, if someone sees what you're doing, they can turn off javascript and then they would not get the new page.

The result can be better achieved with server-side scripting, although if the site is hosted by Wordpress I'm not sure what server side scripting they will allow. The point still remains that that this is like using a massive bomb to get rid of a few ants in your house.

lavazza

5+ Year Member



 
Msg#: 3528703 posted 6:49 am on Dec 16, 2007 (gmt 0)

like using a massive bomb to get rid of a few ants in your house

Indeed... and, considering that the ants in question are those intent on downloading music, I suspect that very few will lose their way simply because Firefox doesn't expressly enable "single click" access

I think that it is completely unrealistic to expect a newbie to overcome the 'rule of thumb' that says "if its on teh interwebs, its in the public domain"

encyclo

WebmasterWorld Senior Member encyclo us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3528703 posted 12:01 am on Dec 17, 2007 (gmt 0)

Welcome to WebmasterWorld shree49. You can use IE conditional comments to redirect in this case, which would avoid the issues mentioned for both the Javascript method and the problem with user agent spoofing. Place the following in the
head section:

<!--[if IE]>
<meta http-equiv="refresh" content="0;url=/no-ie-please.html">
<![endif]-->

But I would like to emphasize the caveats mentioned by others above, there are some very significant downsides to your idea (not least shutting out 80 to 90% of your potential user base), and I would strongly encourage a different approach.

shree49

5+ Year Member



 
Msg#: 3528703 posted 5:52 am on Dec 17, 2007 (gmt 0)

Hello everyone,

Thank you all for your replies and suggestions.
I guess you all are right. blocking IE would be a easy suicide for the website.

I am trying to have some other solution for this matter.

Thanks.!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved