Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IE detect = recommend Firefox or Opera ? :)

    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

  • #2
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts
    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

  • #3
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    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…
    Code:
        <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…
    Quote Originally Posted by Tim Berners-Lee
    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.

  • #4
    Regular Coder Karen S. Garvin's Avatar
    Join Date
    Nov 2006
    Location
    Maryland
    Posts
    227
    Thanks
    5
    Thanked 2 Times in 2 Posts

    Browsers

    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.
    ----------------------------------------------
    Karen S. Garvin
    http://ksgarvin.wordpress.com

  • #5
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts
    Quote Originally Posted by Error 404 View Post
    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

  • #6
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,274
    Thanks
    28
    Thanked 271 Times in 265 Posts
    Quote Originally Posted by ultranet View Post
    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.

    Quote Originally Posted by Error 404 View Post
    As for putting such a notice…
    Quote Originally Posted by Tim Berners‐Lee
    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.

    Quote Originally Posted by Karen S. Garvin View Post
    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.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #7
    Regular Coder
    Join Date
    Apr 2006
    Posts
    117
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Arbitrator View Post

    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •