• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

can i ask this question here?

Offtopic is the melting pot of everything. If you can't ask it here then you will just have your topic moved and someone might yell at you. But you'll get yelled at no matter what you post, so no worries. Just ask 🙂

Oh, and welcome to ATOT.
 
ok, can anyone tell me how to restrict access to a web page based on your browser type? more specifically, can i block access to my site based on the visitors' browser? thanks
 
Yes, just put a button there that links to Google that says "I am not using FireFox." and they have to click it if that's the case. Because that would be lying, if not.
 
is that sarcasm, i'm lost. i don't use firefox myself as it totally distorts html.

---

Eddie Byrd,

No. Since you have been banned under many other names, sarcasm would be us telling you how welcome you are.

Eddie Byrd
4903 Endolwood Dr Apt C
Charlotte, North Carolina 28215
(704) 569-7975

AnandTech Moderator
 
Well, to answer your question...

if(document.all) {
// MS browsers
}
else if (document.layers) {
// Netscape
}
else if (document.getElementById) {
// Mozilla (FF), Opera 6+, Safari
}

This will do the trick. However, I wouldn't recommend using this method, because it isn't as reliable as server-side (server-side can't be "turned off" like JS can).
 
Originally posted by: ImYourFriend
is that sarcasm, i'm lost. i don't use firefox myself as it totally distorts html.

Um. It distorts HTML? Firefox has better support for XHTML/CSS and the DOM than MSIE Browsers. It is second to Safari I believe.
 
in any regard, what is a script that lets me refrain from non ie, netscape users accessing my site? because the script above didn't work for that. thanks
 
Originally posted by: ImYourFriend
in any regard, what is a script that lets me refrain from non ie, netscape users accessing my site? because the script above didn't work for that. thanks

Um. probably

if(!document.all) {
statements here
}

But why would you need it?
 
i am A: trying to forward them to another page or b: indicate they cannot access this page based on the current browser type. thanks
 
Originally posted by: ImYourFriend
in any regard, what is a script that lets me refrain from non ie, netscape users accessing my site? because the script above didn't work for that. thanks

lol.

i was just guiding you in the right direction... you're supposed to replace the browser name with what you would like to do if the browser was detected..

Why the hell would you block a site unless its IE? IMO, that is retarded.
 
because unless there is a easy method to make the page look the same in firefaux/mozilla as it does in IE, it's pointless for me to even have them visit.
 
Originally posted by: ImYourFriend
because unless there is a easy method to make the page look the same in firefaux/mozilla as it does in IE, it's pointless for me to even have them visit.

Why would you want to test it on a browser that hasn't been updated for years, as opposed to a more standards-compliant browser like Firefox?

I would like to see this webpage.
 
Excuse me from using a browser I have always used.
I asked for a code, not a dispute.
Thanks again, but the code you gave didn't work for me.
I do appreciate your help.
 
actually, Opera 9 is the current best browser simply in terms og web standard compliance. it is the only browser that passes the Acid 2.0 test. if the website that you designed is distorted by FF and or Opera, then your code is wrong. and depending on what the site's subject is, less ppl will go there if you deny access to anyone who isn't using IE as it is an inferior browser.

As Rip the Jacker said tho, it is better to do it serverside with ASP or something like that as that cannot be turned of like Javascript can.
 
Originally posted by: ImYourFriend
ok, can anyone tell me how to restrict access to a web page based on your browser type? more specifically, can i block access to my site based on the visitors' browser? thanks

Probably with a .htaccess file?

This reminds me of a recent digg with a Florida Government Job site.
 
Originally posted by: Rip the Jacker
Originally posted by: ImYourFriend
in any regard, what is a script that lets me refrain from non ie, netscape users accessing my site? because the script above didn't work for that. thanks

lol.

i was just guiding you in the right direction... you're supposed to replace the browser name with what you would like to do if the browser was detected..

Why the hell would you block a site unless its IE? IMO, that is retarded.

Seriously...Firefox is not some fringe browser. It will seriously impede the traffic to your site if you restrict it to IE-only. Then again....it's your private website. Do what you want.
 
Originally posted by: ImYourFriend
because unless there is a easy method to make the page look the same in firefaux/mozilla as it does in IE, it's pointless for me to even have them visit.

If a page doesn't look correct in Firefox, then you probably didn't code it right since the Firefox browser conforms to all W3C standards. If the website is supposed to be professional, my suggestion would be to go back and fix that code.

Link to a site that validates your markup.
 
Back
Top