...

View Full Version : IE detect = recommend Firefox or Opera ? :)



ultranet
01-02-2007, 10:52 AM
Hello coders

I've added this line of code to one of my sites :

here is the code
Code:
<!--[if IE]>
<br /><small><b>
<p style="border: 3px solid black; padding: 2px; ">
Internet Explorer is not a safe or good web browser
Please consider Opera or Firefox
Read more here
</b></p></small>
<![endif]-->* HTMl code removed for readability

In short, if you are an IE user you get a special header telling you that your browser is a POS and maybe you should switch.

Thoughts ?

thanks in advance

croatiankid
01-02-2007, 11:47 AM
If I was an IE developer I would say your code is a POS because it's not well-formed, and depending on your DOCTYPE your page might not render at all on ANY browser. Fix the nesting and it'll be fine

gsnedders
01-02-2007, 02:17 PM
Huh? No matter what doctype it's sent under it'll render. What matters is the MIME type - if sent as an XML document it will throw a fatal error.

How that would be rendered under text/html…

<br>
<small>
<b>
"
"
<p>
style="border: 3px solid black; padding: 2px; "
<b>
"
Internet Explorer is not a safe or good web browser
Please consider Opera or Firefox
Read more here
"

As for putting such a notice…

Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network.

Karen S. Garvin
01-02-2007, 02:52 PM
I agree that the "it's best in browser X" form of coding is a throwback. It's also a turnoff to a lot of people. If all I had available was IE and I saw your site, I might leave, thinking that I couldn't view it at all. You don't want to chase your readers away.

Also, you don't want to insult your reader by implying that they're a dummy because they have IE. If you want to steer them clear of IE, use a carrot, not a stick. You can maybe put a logo or graphic at the bottom of your page, and say something like "Considering another browser? Try...." This will pique their curiosity. A lot of people probably wouldn't know or care why IE is a POS.

croatiankid
01-02-2007, 05:39 PM
Huh? No matter what doctype it's sent under it'll render. What matters is the MIME type - if sent as an XML document it will throw a fatal error.

xhtml 1.0 strict and 1.1 is supposed to use an xml mimetype, but I meant what you said anyway :)

Arbitrator
01-02-2007, 07:04 PM
Code:
<!--[if IE]>
<br /><small><b>
<p style="border: 3px solid black; padding: 2px; ">
Internet Explorer is not a safe or good web browser
Please consider Opera or Firefox
Read more here
</b></p></small>
<![endif]-->It’s kind of hard to make an argument for a browser with superior standards support when you don’t adhere to said standards. I assume lack of standards‐compliance in Internet Explorer is the reason you want people to switch anyway, since that’s what makes everyone’s life a pain.

Regarding your code: the small and b elements should be avoided in favor of the CSS font-size and font-weight properties. Inline CSS and br elements should also generally be avoided as well. You also, as mentioned, have a nesting error; if you start a paragraph inside an element, it needs to also be closed inside that element.

As for the main idea, you could stick a big Firefox and/or Opera logo and information about them on the page instead, unless there’s a feature on the page that you know won’t work in Internet Explorer; then it makes sense to inform the user why the page isn’t working. You could also inform that Internet Explorer 7 was released since a lot of people still don’t know that; while not as good as Firefox or Opera, IE7 is better than IE6.


As for putting such a notice…

Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network.I don’t really think this is applicable. The OP’s comment is more of a “your browser is poor; here are some alternatives” message than a “this page is best viewed with” message. I think the context of “this page is best viewed with” in that quote is also closer to “this page requires proprietary technologies (by Microsoft or Macromedia)”. If you’re saying “this page is best viewed with a modern, standards‐compliant browser”, I don’t see any problem with saying that though; then again the target audience is going to be Joe Schmoe who doesn’t know why he should care what modern or standards‐compliance are and why their current (IE) browser is neither.


Also, you don't want to insult your reader by implying that they're a dummy because they have IE.Informing the ignorant is not implying that those people are stupid, just that there was something they may not know. Ignorance and stupidity aren’t the same, so implying that someone is one or the other is also not the same.

Tyrial101
01-03-2007, 03:56 AM
Regarding your code: the small and b elements should be avoided in favor of the CSS font-size and font-weight properties. Inline CSS and br elements should also generally be avoided as well. You also, as mentioned, have a nesting error; if you start a paragraph inside an element, it needs to also be closed inside that element.


In accordance with what Arbitrator said, you want to watch out for code that is
depreciated, or out of date.These codes may be phased out soon, and it isn't going to matter what browser the person uses.

Also, some people prefer IE because it is what they are used to. Make the consider, but don't force it on them.
It is the persons opinion on whether or not the browser is good.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum