Results 1 to 25 of 29
Thread: Blocking Firefox.
-
08-21-2007, 03:27 PM #1Disabled
- Join Date
- Nov 2006
- Location
- Sunderland, UK
- Posts
- 21
Blocking Firefox.
Hi,
I was wondering if there anyway to block firefox from accessing my site? And if there is, could you please post the code to do so.
Danny.
-
08-21-2007, 03:30 PM #2Web Hosting Master
- Join Date
- Jan 2006
- Location
- Athens, Greece
- Posts
- 1,481
Either from Apache conf by checking the Browser string or with javascript. I think with PHP too, but can't recall.
I will return with examples.
-
08-21-2007, 03:30 PM #3Newbie
- Join Date
- Apr 2007
- Posts
- 28
I would rather plan to Dump IE, FF Rocks
<< Please see rules regarding signature setup >>
-
08-21-2007, 03:35 PM #4Web Hosting Master
- Join Date
- Jan 2006
- Location
- Athens, Greece
- Posts
- 1,481
hostcurry you are right, anyway here is some examples:
PHP
$browser = $_SERVER['HTTP_USER_AGENT'];
if (($pos = strpos($browser, "Mozilla")) !== false)
{
echo 'Mozilla blocked';
}
Javascript, refer here:
http://www.netmechanic.com/news/vol3...cript_no15.htm
EDIT: tested and fixed PHP codeLast edited by Steve_Arm; 08-21-2007 at 03:41 PM.
-
08-21-2007, 03:37 PM #5Disabled
- Join Date
- Nov 2006
- Location
- Sunderland, UK
- Posts
- 21
Thanks alot.
-
08-21-2007, 04:17 PM #6Grand Nagus
- Join Date
- Dec 2002
- Location
- Ferenginar
- Posts
- 4,157
Just curious, why would you want to block FireFox?
-
08-21-2007, 04:32 PM #7Web Hosting Master
- Join Date
- Jan 2003
- Location
- U.S.A.
- Posts
- 3,928
Maybe his website isn't compatible with firefox...
-
08-21-2007, 04:34 PM #8Web Hosting Master
- Join Date
- Aug 2002
- Location
- Superior, CO, USA
- Posts
- 635
And remember to tell your users about tools to get around this.
-
08-21-2007, 05:42 PM #9Junior Guru Wannabe
- Join Date
- Jul 2007
- Posts
- 41
That would be really bad to block firefox from a website. Users are not going to go through the trouble to open a separate browser to view a website. Make the site compatible to firefox and IE or sales will suffer.
-
08-21-2007, 06:51 PM #10Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
-
08-21-2007, 11:06 PM #11Web Hosting Master
- Join Date
- Mar 2007
- Location
- Phoenix, AZ, United State
- Posts
- 1,525
You can change your user-agent passed with firefox in it's config. There is nothing you can do here that will work 100%.
drew@slicie.com - Vertical Scaling Servers
30 Minute Backups - Pay for what you use
-
08-22-2007, 12:17 AM #12Junior Guru
- Join Date
- Oct 2006
- Posts
- 181
Well, while I won't tell you what to do, I will give you my two cents.
If you decide to do that, you are going against everything that every web designer strives for, from a business aspect anyway, and that is 100% compatibility. When you block firefox, you are are cutting out 25-40% of your potential market. Not so much of a good idea if you like making money. You will steer plenty of potential customers away. Now again this is all assuming this is for a business, but even if it is not, you will still push away plenty of visitors.
Just curious why you would be against Firefox. Speed, reliability, security, usability. It has all those things, and last time I checked Internet Explorer had none of those. Although IE7 has tabs, but I heard someone found a security hole through the tabbing system that could allow them to format your harddrive and steal your credit card numbers. (I Kid, just my opinion about IE).
Cody
-
08-22-2007, 02:11 AM #13WHT Addict
- Join Date
- May 2007
- Location
- Orange Country, CA
- Posts
- 138
Bizarre requests like these stem only from a lack of understanding of computer systems. Attempting something like this is a practice in futility. You can not successfully block any computer system from making HTTP requests to your website without blacklisting IPs.
The only explanation, I can think of, for attempting something so ridiculous as this is as a prank. "Ha ha, I made it so you can't view my site with Firefox. You have to use some other browser! Ha."
Lame.
-
08-22-2007, 02:54 AM #14Web Hosting Master
- Join Date
- Apr 2003
- Location
- Los Angeles, CA
- Posts
- 820
Excellent! You have now blocked half of the world. Last time I checked Internet explorer identified itself as "Mozilla":
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322)
And as a personal opinion, if you're blocking Firefox, you lost a potential customer: me. Sorry, but I'm NOT going to switch browsers just to see your site. I just don't care that much. That's my attitude, and I wonder how many other surfers share it.Pings <1 ms, Unlimited Transfer, Lowest Price: http://localhost/
-
08-22-2007, 02:58 AM #15Disturbed
- Join Date
- Dec 2002
- Location
- Jackson, MI
- Posts
- 1,525
I share you view, except in the case of my bank, which I would switch, but cant atm. There website will not allow me to do a few things in firefox, but its not stuff I have to do most of the time anyways.
Any business that cannot make there site work in firefox, is a business I do not ever want to do business with!
-
08-22-2007, 03:11 AM #16Web Hosting Master
- Join Date
- Jan 2006
- Location
- Athens, Greece
- Posts
- 1,481
Luki,
clever signature, very funny.
Yes you are right, now I'm blocking the world. Only Opera users will see the site. More than expected.
It isn't "Mozilla" then it's "Firefox".
A minor error to quickly help the fellow here. Of course I wouldn't block FF either, but let the guy do what he wants, it's his site.
-
08-22-2007, 09:14 AM #17Web Hosting Guru
- Join Date
- Nov 2005
- Location
- Palma de Mallorca, Spain
- Posts
- 263
The only explanation, I can think of, for attempting something so ridiculous as this is as a prank.... Ha ha, I made it so you can't view my site with Firefox. You have to use some other browser! Ha.
I have another nice theory about the thread starter reasons to filter firefox... perhaps he wants to avoid the use of firefox *addons* that allow to "play" with his site like "tamper data" addon
Yeah it seems that someone read this about "Turning Firefox to an [Ethical] Hacking Platform"
http://www.security-database.com/too...n-Ethical.html
I'm being ironic of course.
Plain and simple as other people stated: allow your web users come from IE, Firefox, Opera and Safari... try to be compatible. If you're not full compatible, see your stats. If you're firefox/opera/safari traffic is 2% at your homepage... well... don't waste your time.
My two cents!
-
08-22-2007, 11:43 AM #18WHT Addict
- Join Date
- May 2007
- Location
- Orange Country, CA
- Posts
- 138
I'm not taking sides here. IE, Opera, Firefox, Safari... doesn't matter. Trying something like this is a waste of time and effort.
Hahaha! If this is true, and I sorely hope that it is not, this is again, another misconception of computer systems.
-
09-26-2007, 09:25 AM #19Web Hosting Guru
- Join Date
- Nov 2005
- Location
- Palma de Mallorca, Spain
- Posts
- 263
Okay, I've been told by a friend that lately some webmasters are willing to block firefox due some addons designed to block advertisement banners. Well, it's a reason... That could explain it all, since the thread starter didn't say anything about it... *grin*
-
09-26-2007, 09:43 PM #20Newbie
- Join Date
- May 2007
- Posts
- 26
While this is true, if webmasters decide not to do business with anybody who has a browser for which there exists an addon that can block advertising, they won't have a lot of visitors left
-
09-29-2007, 03:10 AM #21Newbie
- Join Date
- Jul 2007
- Posts
- 5
Probably they would like to block firefox, because they show big amount of banners... AdBlock is very cool
-
09-30-2007, 10:56 AM #22Newbie
- Join Date
- Sep 2007
- Posts
- 6
Use a JS Method to check the useragent and redirect the user to a fail page.. If they want to get in while it looks bad to firefox, it's really their choice, so put a link on that page so they can decide to view it or not
-
09-30-2007, 11:24 AM #23Web Hosting Master
- Join Date
- Aug 2005
- Posts
- 3,587
A desperate attempt to stop Firefox and his uber-feature AdBlockPlus.
Let me remind you that another extension allowes changing of user agent I can make Firefox appear as IE7.
-
09-30-2007, 07:23 PM #24Web Hosting Master
- Join Date
- Aug 2005
- Location
- UK
- Posts
- 654
You could use "detect by functionality" and not "detect by user agent" like every one else here is suggesting, and like most people, I think it's a bad idea to go down this road as I could even fake this.. but I'll explain..
In IE vs FX, there are particular objects and functions that do and do not work, or work but with different results.
A simple example is that the paramitar passed the the onclick="()" function in IE is called e where as in other (decent, read Firefox, KHTML, WebKit, Opera) browsers it would be Event..
-
10-01-2007, 12:08 AM #25Junior Guru Wannabe
- Join Date
- Aug 2006
- Location
- India
- Posts
- 32
Firefox has close to 15% market share at the moment and it is growing. By blocking Firefox, you will be losing out on this large chunk, besides earning their ill-will.