PDA

View Full Version : How to disable Website from opening with Firefox



shyamdev
05-21-2006, 08:47 PM
I have my website, that needs to be stopped opened in Firefox, as the design looks messy in Firefox browser, instead the users should be given an alert to use internet explorer 6 or above.

could anyone give me some code or idea how to do that.I searched the whole internet but did not found this code. my last hope here :p


thanks in advance :)

benslayton
05-21-2006, 08:53 PM
please

Twey
05-21-2006, 09:00 PM
And when they say "no" and leave? When they would prefer to find an alternate source of information to your site than use a buggy, incompatible, closed-source browser? What will you do then?

And if they are more patient (which a lot of them won't be) what will you do about those users who don't have Internet Explorer?
Advise them to download it?

And what about those who don't have a system for which Microsoft has released a version?
Will you advise them to pay, what is it nowadays, $100 for a copy of Windows they don't want or need, just so they can view your site?

One should design one's site for one's viewers, not expect one's viewers to take measures to make one's site look decent. To attempt to force users to use a particular piece of software, or change their browser settings to suit your site, is sheer arrogance.

mwinter
05-21-2006, 09:05 PM
I have my website, that needs to be stopped opened in FirefoxStop wanting that.


as the design looks messy in Firefox browserSo the actual problem is poor implementation on your part. The obvious solution, then, is to learn how to author properly, not unnecessarily restrict your audience.

You need to realise that IE is broken and that is why decent browsers like Firefox or Opera will render the site badly: you are relying on bugs in IE to achieve a particular result. Reimplement using Firefox or Opera to evaluate presentation, and ensure that you trigger Standards mode rendering. If necessary, fix-up bugs in IE as you go along.


instead the users should be given an alert to use internet explorer 6 or above.And if they don't have Internet Explorer (or if they think it's crap, which is why they choose not to use it)? How many people do you think will actually start IE just to use your site? It's far more likely that they'd hit Close, or use the Back button and go to the next search result.

Statistics on the Web don't tend to mean a great deal as far as specifics go, however they do indicate trends. The current trend is away from IE, so excluding other browsers will only hurt you in the long-term.


thanks in advance :)You're welcome.

Mike

shyamdev
05-22-2006, 05:25 AM
Hey guys thx, some of your concerns were legitimate.

but yeah it would have been more helpful if i had got what I wanted apart from your kind advices. Firefox makes my site vulnarable to maliciuous stuff like giving many advanced options like search for links without logging-in to their accounts. Security wise as far as my needs are for my website, I guess Firefox is not good for me. I would not mind if people go away from my site, but priority is to protect the contents in the secure area. Needs vary :)

but those who might want looking for such a code and simple. i write myself, enjoy. :p



<script language="JavaScript" type="text/JavaScript">
if(navigator.appName != "Microsoft Internet Explorer")
{
alert("Please use the Internet Explorer browser. Thanks!!")
window.close();
}

PS. give people what they want, offcourse with caution and advice if any. thanks.:D

Twey
05-22-2006, 06:24 AM
Wow... you've just turned away 20% of your customers (according to, as Mike noted, unreliable Web statistics).
If your site has problems in another browser, be it Firefox, Opera, Konqueror, whatever, it is your site that is flawed, not the browser, and it should be fixed (unless due to a genuine bug in the browser). This includes security risks. If Firefox users can access sensitive data you'd rather they didn't, then that sensitive data is being sent from the server, and can be accessed by _anyone_ with the right knowledge, not just Firefox users. Besides, anyone can disable Javascript and access your site in whatever browser they wish anyway.

That's not actually protecting anything, just winding up all the non-IE users out there.

djr33
05-22-2006, 06:41 AM
If you really think it's gonna be secure, it's funny that you pick Internet Explorer. There are many more security holes in IE than firefox, and I think hackers generally know more about hacking IE and with firefox.

Anyway... as long as you're happy :)


AND.. if you need it to be secure, turning off javascipt will make that code not work.
Use php or a server side language they can't get around.

shyamdev
05-22-2006, 07:40 AM
If you really think it's gonna be secure, it's funny that you pick Internet Explorer. There are many more security holes in IE than firefox, and I think hackers generally know more about hacking IE and with firefox.

Anyway... as long as you're happy :)


AND.. if you need it to be secure, turning off javascipt will make that code not work.
Use php or a server side language they can't get around.

thx, i have server side code, in PhP and few javascript and HTML stuff.
Firefox undone all the security stuff that works fine with IE.
and my intention is not to reach-out to people, its actually the otherway round...I have no concern if people do not visit my site, its already very popular. :p. my needs are totally different, which now I fixed myself (offcourse may be this is a temporary solution, but was an urgent requirement) thx for advice anyway.

djr33
05-22-2006, 09:46 AM
thx, i have server side code, in PhP and few javascript and HTML stuff.Of those three, ONLY PHP is server side. Javascript is client side, and html is just "markup language"... not even code; it's just formatting and content... no scripting.
PHP is secure because people can't access your server and change it.
Javascript operates from the users computer, so they have some access to it.
Also, php has NO compatibility issues because its serverside... the client can have whatever browser, system, etc etc and it will work. With javascript, it must be compatible and must be enabled.


Firefox undone all the security stuff that works fine with IE.Yes, but people can hack IE, and get around your "security" that way.


Sounds like you have a plan.
Just be careful.
And realize that your javascript can be beaten... people can get around it if they try hard enough.
But... should be "secure" to the average user, yes.

Twey
05-22-2006, 03:20 PM
What if everybody thought like this? The Web would be in tatters (even moreso than is currently the case). If your site isn't secure in one browser, it isn't secure in another, and winding up your users for no reason at all, no matter how popular your site may be, is not a good idea.
Javascript operates from the users computer, so they have some access to it."Some" access is a little misleading. The user has total control over every client-side technology you use in your site. They can make it purr, bark, sit up and do tricks... there is no, repeat no effective security measure that can be implemented client-side.

mwinter
05-22-2006, 03:39 PM
but yeah it would have been more helpful if i had got what I wanted apart from your kind advices. [...]Just because you don't recognise help when you read it doesn't mean that it wasn't provided. The right answer isn't always the one you'd like to receive.


Firefox makes my site vulnarable [...]That seems to be a dubious claim. It's far more likely that you have failed to anticipate something, therefore your site was vulnerable to start with and Firefox just made it more apparent.


but those who might want looking for such a code and simple. i write myself, enjoy. [UA browser detection]Totally futile and trivial to circumvent.


PS. give people what they want [...]When you ask for information for free, you get what you're given. If you only want to be told what you want to hear, you're quite welcome to pay for the privilege.

Mike

djr33
05-22-2006, 06:09 PM
Yes, Twey, and ADVANCED user has total control over javascript. The average user only has some control, if only disabling it.
But... yeah... the javascript isn't really secure in any way from those who know what they're doing.
Don't take my phrasing to mean it is somewhat secure... only somewhat tricky for those who don't know what they're doing to get around. Not for those who do. And they're the ones who'd do what you are trying to stop anyway.

Alexandriusxxx
05-22-2006, 07:20 PM
http://top.mobilmir.com
Melodies, trade marks, Java of game, polyphony, price for telephones, mobile catalogue,ringtones

Twey
05-22-2006, 07:46 PM
You missed "spam."

shyamdev
05-24-2006, 12:13 PM
Btw this is the PHP code to check browser, improvise it to achieve what you want once you identify the browser type.



if(strpos($_SERVER[HTTP_USER_AGENT], "MSIE"))
print "yo!! You are using an IE browser!!";
else
print "yo!! You are using an non-IE browser!!";

Its server side, so its a lot secure than Javascript code I gave earlier

Twey
05-24-2006, 12:27 PM
No, it isn't.
All that code illustrates is that you have little or no idea about what actually goes on in HTTP, and a fairly poor grasp of PHP, at that.

Firstly, strpos() can return 0 while haystack still contains needle, which would cause your script to fail. You should check its result with ... !== false.
Secondly, it is not "secure" at all, since any browser can be configured to send a different User-Agent string.

shyamdev
05-24-2006, 01:19 PM
No, it isn't.
All that code illustrates is that you have little or no idea about what actually goes on in HTTP, and a fairly poor grasp of PHP, at that.

Firstly, strpos() can return 0 while haystack still contains needle, which would cause your script to fail. You should check its result with ... !== false.
Secondly, it is not "secure" at all, since any browser can be configured to send a different User-Agent string.

If you know the code, why not give the code

we are here to help eachother correct?? :)

..or just to critisize and find faults. :(

Twey
05-24-2006, 01:25 PM
That's the point. While I'd love to help you, there is no way to "securely" achieve what you want to do, and no reason to try. Therefore, all I can do is show you how each successive scheme you come up with is wrong, until you get the idea and design your site better so this isn't necessary.

djr33
05-24-2006, 05:46 PM
Yet another example of:
1. Confusing the "good" viewers.
2. Not hindering the "bad" viewers (hackers, etc.).

No offense, but it just isn't gonna work.

esteban
06-05-2006, 11:26 PM
ASIDE: This has been one of the most unintentionally hilarious threads I have read in a long, long time. At first I thought the original post was a joke.

But then, when I realized that this poor fellow was serious, well, then... it wasn't funny anymore.

And when he still persisted, in spite of your advice...

Well, I'm at a loss for words.

Twey
06-06-2006, 10:59 AM
There are worse out there, believe me :)