...

View Full Version : Deny IE



Deacon Frost
12-23-2008, 04:54 PM
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? ^.^.

jerry62704
12-23-2008, 06:07 PM
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.

mlseim
12-23-2008, 06:11 PM
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=php+detect+browser&btnG=Search

jamesicus
12-23-2008, 06:42 PM
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 (http://jp29.org/wpointerop.htm) and Web Content Accessibility (http://jp29.org/wpowca.htm). 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! (http://webdesign.about.com/od/webdesigntutorials/a/aa061404.htm)

JFP

Apostropartheid
12-23-2008, 06:54 PM
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.

Deacon Frost
12-23-2008, 07:22 PM
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.

Millenia
12-23-2008, 07:25 PM
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 :D

Deacon Frost
12-23-2008, 07:26 PM
Sounds like a brilliant idea :D

Thanks :D...

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

Millenia
12-23-2008, 07:27 PM
Thanks :D...

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.


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.

<!--[if ie]><meta http-equiv="refresh" content="0;URL=http://www.example.com/"><![endif]-->

Deacon Frost
12-23-2008, 07:30 PM
viva la revolution!

..Back on topic, this is some basic javascript I found that detects IE.


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 :D.


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 :D!

Again, however, is there chance of exploits in this JS?

Apostropartheid
12-23-2008, 07:33 PM
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.


<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>

Millenia
12-23-2008, 07:35 PM
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?

Deacon Frost
12-23-2008, 07:36 PM
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.


<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.

Apostropartheid
12-23-2008, 07:44 PM
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.

Deacon Frost
12-23-2008, 07:51 PM
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.

Apostropartheid
12-23-2008, 07:54 PM
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.
I don't understand you.

If your site is promoting open source, why do you want to send IE/Windows users AWAY from it? Surely that is against the point of the site?

oracleguy
12-23-2008, 07:56 PM
Maybe you could do an OS detection as well?

That would be taking it to an extreme even for a anti-Microsoft crusade. There are lots of people that don't use IE but still have to use Windows for various reasons. Like I would switch my main desktop over to Linux except for being unable to play TF2 and L4D in Linux. (most of my servers and my laptop run Linux)

Microsoft does have some good products such as Visual Studio, which I think is still the most refined IDE available. Also Visio (which Microsoft bought) is a good product that really doesn't have a solid cross platform alternative.

I'm not saying your idea is a bad one but the point I am trying to make is that you need to keep your idea in perspective so it doesn't come off as a case of extreme fanaticism. You would be fighting a lot of ignorance because just in regard to web browsers most people don't make the distinction between the internet and their web browser.

Deacon Frost
12-23-2008, 07:56 PM
I don't understand you.

If your site is promoting open source, why do you want to send IE/Windows users AWAY from it? Surely that is against the point of the site?

I'm promoting all the open source if the person just makes a little commitment to switch browsers.

If they're truly interested in seeing what they can do to help, then switching browsers should be the first thing as it's the easiest, and quickest thing to do. Switching OS' take time, so offering that first off would be pointless. Telling people that if they switch browsers, they've helped out already, then offering several other things they can do to join the movement, it's all about guiding those who aren't completely computer knowledged into creating/maintaining a free internet.


That would be taking it to an extreme even for a anti-Microsoft crusade. There are lots of people that don't use IE but still have to use Windows for various reasons. Like I would switch my main desktop over to Linux except for being unable to play TF2 and L4D in Linux. (most of my servers and my laptop run Linux)

Microsoft does have some good products such as Visual Studio, which I think is still the most refined IDE available. Also Visio (which Microsoft bought) is a good product that really doesn't have a solid cross platform alternative.

I'm not saying your idea is a bad one but the point I am trying to make is that you need to keep your idea in perspective so it doesn't come off as a case of extreme fanaticism. You would be fighting a lot of ignorance because just in regard to web browsers most people don't make the distinction between the internet and their web browser.



An amazing post. I will be touching on your points in the site as well. It's because of corporations like Microsoft that our games, great programs, and such are not usable on free clients. Pretty soon, Internet Explorer will be only usable on Microsoft OS', and will make people even less willing to make the switch.

If developers of product would focus on pleasing the whole crowd, and not just Microsoft users, then there would be more linux users. Like I said, they expect us to make compliant pages, yet they don't make compliant products.

EDIT: Sorry, I hadn't read your last paragraph. Yes, my idea is just to inform, not to crucify. I don't blame the users, but if people were better informed, I'm sure they'd be less willing to use such an outrageous companies product, and maybe other companies would develop for other systems as well.

BabyJack
12-23-2008, 08:21 PM
I personally think that the website could be aimed at Linux/Mac users, not Windows—and persuade the Windows users to switch.

Thats my stance on this project.

(PS— I totally agree with DeaconForest. I hate Windows. I only have a Windows PC because I NEED to play The Sims.

Apostropartheid
12-23-2008, 08:28 PM
Ah, I see what you're trying to do now.

But I'm still sceptical about how you're going about this; what about Safari? Its rendering engine is open source but it isn't in itself. OS X also is closed-source, yet hasn't made an appearence. And this concerns me, because this says "Microsoft hater" more than "open source propagator". You're going to need some careful copy writing in any case: people are unusually defensive of things that they've made a large investment in (see: games consoles).

As for the application ecosystem: I do not blame application writers for keeping to Windows and OS X. Software writing costs a lot in programmers' dripping blood, and companies take a necessary view on things: why should we spend so much money writing software for a platform with a microscopic amount of users for little return? And they also suffer from being closed-source, too: seeing as the majority of voluntary Linux users are open-source zealots, they're unlikely to go for these ubiquitous applications.

I'm sorry if I come off as unnecessarily dismissive; I'm a cynic and a realist, so this is my interpretation of "help".

+ "IE only being usable on MS's OSs?" Did I miss something?
++ (I'm only being a grammar Nazi here, no offence) The plural of OS could be OSs or OSes, or, in theory, OS. No apostrophes?

mlseim
12-23-2008, 08:29 PM
I see the point now ...

He's like the guy down the street that has his front yard full of
anti-this and anti-that signs ... including signs that protest the
city's rules on posting signs.

Hey man, freedom of speech. Go ahead with your website.
Everyone has the right to make a statement, and those that don't
want to see it or can't see the page will simply leave.

I think it's a waste of time, but what you do is not really any of our business ;)

BabyJack
12-23-2008, 08:36 PM
IE works on Mac.
If you have IE:Mac from Mactopia.

Apostropartheid
12-23-2008, 08:43 PM
IE works on Mac.
If you have IE:Mac from Mactopia.
Do you mean ies4osx?

oracleguy
12-23-2008, 08:51 PM
Perhaps a better aim for the site would be to target users who have heard the words "Open Source" and "Linux" and "Firefox" and educate them on what they are/mean. You could show how for a lot of people that just type documents and use the Internet, that they could do the same thing in Linux and explain why it would be better.

You'll have to do a lot of educating either way so you could provide a site that would help people make the switch and provide resources for them to learn how to do the same tasks using different tools. Perhaps there is already a site like this but if not, you'd be the first and could actually make an impact.

FWDrew
12-23-2008, 08:58 PM
http://www.crashie.com/

One line is all you need to end it for the ie users and lock up their browser:

<script>for(x in document.write){document.write(x);}</script>

Not that I would ever do that but I think its hilarious to see someone else do it. yea yea, all your arguments about the users. Its still funny.

Apostropartheid
12-23-2008, 09:05 PM
http://www.crashie.com/

One line is all you need to end it for the ie users and lock up their browser:

<script>for(x in document.write){document.write(x);}</script>

Not that I would ever do that but I think its hilarious to see someone else do it. yea yea, all your arguments about the users. Its still funny.
HA, DIDN'T WORK!
I'm sure someone will come up with an alternative.
But still.
Pity.

BabyJack
12-23-2008, 09:11 PM
What versions of IE can this website crash?

Most versions of IE 7 and lower.

Doesn't work on IE 8.

FWDrew
12-23-2008, 09:12 PM
HA, DIDN'T WORK!
I'm sure someone will come up with an alternative.
But still.
Pity.
From the site:

Ha! My IE didn't crash.. What do you say to that?!
No matter how you look at it, IE is still a horrible browser.
True, true.

Apostropartheid
12-23-2008, 09:12 PM
Doesn't work on IE 8.
I know. The title doesn't say "Crash IE < 7", though (mainly because it sounds AWFUL) so it amuses me. I'm sure something will pop up...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum