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.
Page 1 of 2 12 LastLast
Results 1 to 15 of 29

Thread: Deny IE

  1. #1
    Regular Coder Deacon Frost's Avatar
    Join Date
    Feb 2008
    Location
    Between the Lines
    Posts
    279
    Thanks
    31
    Thanked 4 Times in 4 Posts

    Deny IE

    I want to deny users of my website access if they are using internet explorer with a message saying "Please use a better browser" and something linking to firefox or the like...

    Is there something I can put in my .htaccess that will do this?


    EDIT: The reason is, I think IE should be depreciated, and web browsing/dev should be done on a better browser, or we should encourage users to use something less crappy.

    Extra edit: Olol, could you move to the Web Building area? ^.^.
    Last edited by Deacon Frost; 12-23-2008 at 05:18 PM.

  • #2
    Senior Coder jerry62704's Avatar
    Join Date
    Oct 2007
    Location
    Springfield, IL
    Posts
    1,100
    Thanks
    13
    Thanked 87 Times in 87 Posts
    Say you have two divs on the page. One is for the IE people and hidden by default. The other has the real page.

    With a conditional statement include css to hide everything else and unhide the IE page.
    .
    .
    ...and gladly would he learn and gladly teach

    Visit www.LiberalsWin.com for humor and the unique Bush/Obama Approval Polls

  • #3
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,500
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Holy cow.

    I hope your website is like a blog or something, and you're not attempting
    to sell anything or make money from it. That would be sort of sad.

    See this:
    http://www.w3schools.com/browsers/browsers_stats.asp

    So you're willing to turn away 46% of your visitors?
    and you didn't say anything about Chrome, Safari or Opera.

    Use PHP to detect browser:
    http://www.google.com/search?hl=en&q...er&btnG=Search

  • #4
    Regular Coder jamesicus's Avatar
    Join Date
    Oct 2008
    Posts
    106
    Thanks
    0
    Thanked 11 Times in 10 Posts
    Quote Originally Posted by Deacon Frost View Post
    I want to deny users of my website access if they are using internet explorer with a message saying "Please use a better browser" and something linking to firefox or the like .........
    Please reconsider this, Deacon Frost -- it flies in the face of the principle of Web Page Interoperability and Web Content Accessibility. Good Web Authoring techniques will insure your pages render satisfactorily in all User Agents (Graphical Browsers, Textual Browsers & Screen Readers).

    Keep in mind that is very difficult to produce "pixel perfect" layouts. Reference: About.com: Web Design/HTML -- You Can't Get Every Page to Look Identical, So Stop Trying!

    JFP
    Web Developer Tool Kit - for creating Standards compliant and Interoperable web pages
    W3C Markup Validation Service - validate HTML code for reliable rendering in all Browsers
    WAVE accessibility evaluation tool - check page structure, image alt text, form labels, etc.

  • #5
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Don't do it.

    I'm a web standardista who uses IE8. What are you going to do about me? I can think of quite a few people who use Firefox, Safari or Opera who would think you an obnoxious <insert profanities here> were you to do this, not that you necessarily are. This is generally not a good standpoint.

    And denying 50% of your audience is NOT a good idea, any way you look at it. People use IE and you pretty much just have to get over it.

    However, if you would like to provide an unobtrusive affliate link with a small bit of text explaining what advantages a browser of your choice, then I know the perfect piece of code.

  • #6
    Regular Coder Deacon Frost's Avatar
    Join Date
    Feb 2008
    Location
    Between the Lines
    Posts
    279
    Thanks
    31
    Thanked 4 Times in 4 Posts
    Well, the idea is that IE isn't adhering to web standards well at all. I know how to produce compliant pages easily, and efficiently, but I dislike both the browser and the browser's company for the way they treat users, and the support they offer for a pay-per-view internet.

    The reason a vast majority of people use IE is because the largest OS' comes pre-equipped with it... Microsoft.


    I'm not saying I could do better, or even know how... I just dislike their stances on things, and am accustomed to voicing my opinion on such trivial issues ^.^.

    The idea is to create a site, much like no-www, which informs people of the negative reasons why any microsoft product is a bad purchase, use, and any of the like, while offering reasonable alternatives to better products (I wouldn't just list one or two browsers, I'd list several alternatives to using IE, and even more so... linux.)

    The whole concept is that once users realize they don't have to sacrifice comfortable interfaces, but that they can save money, and respectability by not purchasing/using such a horrid company's products.

    I don't dislike IE users, or feel they don't have the right, just like I don't dislike vegetarians, or feel they don't have the right. It's the same general concept.


    All in all, I was hoping to be able to do a deny through htaccess which would load an error page with all of this listed. But if you feel setting up the page to actually detect browser is a better idea, I may just take that route :P.

  • #7
    Regular Coder
    Join Date
    May 2008
    Location
    Lost in Localhost...
    Posts
    702
    Thanks
    3
    Thanked 43 Times in 42 Posts
    The idea is to create a site, much like no-www, which informs people of the negative reasons why any microsoft product is a bad purchase, use, and any of the like, while offering reasonable alternatives to better products (I wouldn't just list one or two browsers, I'd list several alternatives to using IE, and even more so... linux.)
    Sounds like a brilliant idea

  • #8
    Regular Coder Deacon Frost's Avatar
    Join Date
    Feb 2008
    Location
    Between the Lines
    Posts
    279
    Thanks
    31
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by Millenia View Post
    Sounds like a brilliant idea
    Thanks ...

    The better informed the users, the brighter the future of the internet will look ^.^.

  • #9
    Regular Coder
    Join Date
    May 2008
    Location
    Lost in Localhost...
    Posts
    702
    Thanks
    3
    Thanked 43 Times in 42 Posts
    Quote Originally Posted by Deacon Frost View Post
    Thanks ...

    The better informed the users, the brighter the future of the internet will look ^.^.
    viva la revolution!

    ..Back on topic, this is some basic javascript I found that detects IE.
    Code:
                                 
    function isIE()
    {
      return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
    }
    and I've found more!
    Heres something that redirects users to a different page if they are using IE.
    Code:
    <!--[if ie]><meta http-equiv="refresh" content="0;URL=http://www.example.com/"><![endif]-->
    Last edited by Millenia; 12-23-2008 at 07:30 PM.

  • Users who have thanked Millenia for this post:

    Deacon Frost (12-23-2008)

  • #10
    Regular Coder Deacon Frost's Avatar
    Join Date
    Feb 2008
    Location
    Between the Lines
    Posts
    279
    Thanks
    31
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by Millenia View Post
    viva la revolution!

    ..Back on topic, this is some basic javascript I found that detects IE.
    Code:
                                 
    function isIE()
    {
      return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
    }
    Indeed! ^.^. Maybe developers will start making more compliant programs, since everyone is always on our butt to make compliant websites .


    I'm not too JS fancy, so is there any exploit in using JS to detect browser, and/or deny access?


    You have been fantastically helpful! I could put something small together in a matter of hours! Thank YOU !

    Again, however, is there chance of exploits in this JS?
    Last edited by Deacon Frost; 12-23-2008 at 07:32 PM.

  • #11
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Wait, what? Is your site one big anti-Microsoft crusade? If so, then denying IE users is WAY against the point. Or is the page served up to IE users the anti-MS crusade? If so, you probably need a few lessons in understanding people.

    Anywho, back on topic:
    By far the best way to nudge IE users and IE users only is a conditional comment, which is failsafe against JS being turned off and works in all vaguely recent IE browsers.
    Code:
    <div id="navigation">
      <ul>
        <li>
          <a href="/" rel="index">Index</a>
        </li>
        <li>
          <a href="/about">About</a>
        </li>
      </ul>
      <!--[if IE]>
      <p>I, personally, recommend Firefox for all your browsing needs. It&rsquo;s more versatile, can block all your ads, and will make my life a lot easier. Please take a look. Cheers! <a href="http://firefox.com/">Firefox Home &raquo;</a></p>
      <![endif]-->
    </div>
    Last edited by Apostropartheid; 12-23-2008 at 07:37 PM.

  • #12
    Regular Coder
    Join Date
    May 2008
    Location
    Lost in Localhost...
    Posts
    702
    Thanks
    3
    Thanked 43 Times in 42 Posts
    Wait, what? Is your site one big anti-Microsoft crusade? If so, then denying IE users is WAY against the point. Or is the page served up to IE users the anti-MS crusade? If so, you probably need a few lessons in understanding people.
    I agree, you can't just block them, but you can just redirect them to a page telling them why they should upgrade. Maybe you could do an OS detection as well?

  • #13
    Regular Coder Deacon Frost's Avatar
    Join Date
    Feb 2008
    Location
    Between the Lines
    Posts
    279
    Thanks
    31
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by CyanLight View Post
    Wait, what? Is your site one big anti-Microsoft crusade? If so, then denying IE users is WAY against the point. Or is the page served up to IE users the anti-MS crusade? If so, you probably need a few lessons in understanding people.

    By far the best way to nudge IE users into getting a more standards-compliant browser is a conditional comment.
    Code:
    
    <div id="navigation">
      <ul>
        <li>
          <a href="/" rel="index">Index</a>
        </li>
        <li>
          <a href="/about">About</a>
        </li>
      </ul>
      <!--[if IE]>
      <p>I, personally, recommend Firefox for all your browsing needs. It's more versatile and blocks all your ads, and will make my life a lot easier. Please take a look. Cheers! <a href="http://firefox.com/">Firefox Home &raquo;</a></p>
      <![endif]-->
    </div>
    

    I had planned on putting an free forum software up for those not using IE . The page that would display when denied would be a list of several good alternatives, a brief paragraph on explanations, as well as several articles which show why Microsoft is so disliked amongst several freedom ringers.

    I guess you could say it's a patriotic move .

    I don't want to just suggest FX, I'll be listing, like I said, SEVERAL good, compliant, free internet clients, OS', and anything else I can find open source.


    EDIT: Yeah, my apologies, I guess I hadn't informed of my full intentions. The block was meant to display a page that just lists better browsers, and once they make the switch and such it would have listed several other things they can do to help the cause. Of course, reading your redirect idea changed my mind quite a bit to what I could do with this idea.

  • #14
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Again, I still wouldn't advise this, and I'll tell you why:
    Pretend I googled for "cookies and pie recipes". You're the top result. I click on the link and get presented with a list of things I should apparently do to reach your site.
    What's my reaction?
    "GO AWAY."
    So I click back and go to the second link. That link produces a pie. I am happy.

    Considering Windows is the vast majority, you're going to be losing a LOT of traffic. A lot of traffic which won't be returning.

    Remember this: people don't listen to things they don't want to hear. It's a universal truth. Don't block your users from getting where they want to go

    I'm all for promoting open source. I'm currently on Ubuntu Linux and loving it. But this is going to harm you a lot more than it benefits anyone.

    My recommendation?

    Pretend I am the same cookie and pie guy. I go to your site. I am presented with a pie, but I see this weird word which I've never seen before. "Linux"? I'm intregued. I click on the Linux link. I read all about Linux and I decide to give the Live CD a try.
    Result? A fantastic OS and my pie! And I am again happy.

    Instead of trying to FORCE my readers into listening to this rant about open source, I let them research it themselves, with a gentle push in that direction. The user now actually wants to listen. The user does not press back. We are both happy.
    Last edited by Apostropartheid; 12-23-2008 at 07:52 PM.

  • #15
    Regular Coder Deacon Frost's Avatar
    Join Date
    Feb 2008
    Location
    Between the Lines
    Posts
    279
    Thanks
    31
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by CyanLight View Post
    Again, I still wouldn't advise this, and I'll tell you why:
    Pretend I googled for "cookies and pie recipes". You're the top result. I click on the link and get presented with a list of things I should apparently do to reach your site.
    What's my reaction?
    "GO AWAY."
    So I click back and go to the second link. That link produces a pie. I am happy.

    Considering Windows is the vast majority, you're going to be losing a LOT of traffic. A lot of traffic which won't be returning.

    Remember this: people don't listen to things they don't want to hear. It's a universal truth. Don't block your users from getting where they want to go

    I'm all for promoting open source. I'm currently on Ubuntu Linux and loving it. But this is going to harm you a lot more than it benefits anyone.
    I completely understand you, and agree with you.


    But my site isn't going to be about pie. It's about open source, the free internet movement, and people taking a stance against corporations dipping their hands into hard working people's pockets.

    This is what people will see in Search Engines, around the web, and the like. Not "Grannies home made cookies" but "Join many who think technological advancement should be free, and enjoyable." Of course, IE users click to see that "In order for us to show people our seriousness against the major corporations who insist on preventing us from creating the future, we ask that you switch to alternative browser: <list many here>".

    It's just a rough draft, obviously, but the general point of the whole thing is that users are getting what search result they clicked on.

    If the site was about something random, and I denied users just because they use IE, then of course the website would go no where. But when it's about teaming up to take down the bully... then I see nothing wrong with it.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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