View Full Version : No Other Browsers...........
dchopda
04-07-2009, 04:25 AM
Hi,
I have made a website on my local machine.
I want that it works with only IE & FF.
Is there any script that can be helpful to me.
I want that, when browsers tried to open the page, a custom message should be displayed first and depends upon browsers, page loads.
Does anyone help me?
you might start with DD's Browser Sniffer script (http://www.dynamicdrive.com/dynamicindex9/browsersniffer.htm). It can id IE, but FF is lumped in with all the other "Gecko/KDE-based browsers that are not NetScape".
djr33
04-07-2009, 04:41 AM
This is, overall, the wrong approach to website design. You should at most give a notice that those browsers are preferred/supported, and at best use standards so that it should be compatible with all browsers.
You can use several methods to deny access to other browsers, but that's like trying to vaccinate yourself against all diseases except the common cold and the flu-- you can't be sure exactly what's going to try to access your site and you can't block it really. Even if you do try to block it with only allowing those (if it's not one of those blocking it), then it might work but you'll get some errors (some people blocked who are using those, some people not blocked who aren't). Javascript can be disabled in the browser; a server side solution requires that the information sent to the server is accurate and that is not always the case.
The best approach would be to try a server side approach, I guess, and check the browser type (if it contains "IE" or "Mozilla" let it pass, basically), but that isn't a good plan if you want people to like your site.
The only case in which this would make real sense is if you are designing a complex application that really needs the specific support of one browser, but if you make it compatible with Firefox and IE, then it won't be hard to get it to work for the rest. Firefox is very close to standards compliant; anything that works in it should be close to working in most other close-to-standard browsers, and IE is problematic and not standards compliant-- but usually that is the problem browser; if you already have it working, then you have standards and IE met, so there's no real reason to disallow other browsers.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.