d d wrote:
> Richard Cornford wrote:
>> So it is usually an inability to pin-down the question that
>> should be being asked that leads people to promote the notion
>> of browser sniffing, regardless of the fact that it is known
>> to be an impossible task to do accurately.
<snip>
> Well, your reply basically boils down to two major arguments.
> One is that there's no need to sniff (and I accept that I
> didn't add any proof that there is a reason). The other
> argument being that it's impossible to sniff accurately.
You weren't reading very accurately. I said that as it is impossible to
accurately determine the browser or its version and perceived need to do
so is an irrelevance.
> Just because I didn't go into great detail about the problems,
> doesn't mean they aren't real.
But it does man that you cannot be shown how you could avid your
perception of a need to browser sniff by learning how you might identify
the tests that will give you the answers you really need.
> I didn't want to write 250 lines that nobody would read.
250 lines of text would be pointless. 250 lines of code that
demonstrated your perception of a need would be something else. It might
make your point for you, or it might be the starting point of your
learning how the rest of us are happily getting by without browser
sniffing.
> I'll just say this. Try going to either the Firefox or Safari Bugzilla
> DB's and check out the numerous problems
> that are specific to a particular version of the browser,
> and/or a specific version of a plugin. Whether you or I
> consider Flash to be something that shouldn't be used, that
> doesn't mean it won't be. I don't get involved in any of the
> site design decisions, but I have to live with them. If I know
> that a specific version of a plugin will crash a specific
> version of a browser if used in a certain way, then it would be
> irresponsible to NOT sniff for those two conditions and take
> action to avoid the logged browser crash.
So rather than narrowing down to the specifics of a particular case and
letting us test the proposition that your examples cannot be tested for
you are becoming even more vague and pointing at the entire bug
databases of two browsers.
Browsers have bugs. They always have and the always will. Yet the
Internet exists, mostly works, and people make a living writing code for
it that does not get involved with browser sniffing.
> Regarding the point that it's impossible to sniff accurately.
> Well that's just not true.
Your saying that something is not true does not make it so. There are
only two browser-sniffing techniques: UA string testing and object
inference. Both have flaws that render them incapable of accurately
discriminating web browsers and their versions.
> You can sniff very accurately for default browsers,
What is "the default browser"?
> and the default user agent string is the vast majority.
Is "the vast majority" of what?
> OK you can make Netscape 8 pretend to be either IE or
> Firefox, you can make Opera and Safari pretend to be
> just about anything.
You can make IE pretend to be just about anything as well, but the real
problems come with the many browsers that pretend to be one of the major
browsers (usually IE) by default.
> If those spoofed user agent strings cause a mis-sniff,
There you go. It is an unreliable technique, and nothing can be done to
stop that.
> then it's their own fault.
No it is not. The HTTP specification makes it very clear that the User
Agent (and so the browser's userAgent string) is not a source of
information; that is it essentially an arbitrary sequence of that
doesn't even have to be the same for any two consecutive requests.
Predicating a strategy on treating something that is not a source of
information as if it was a source of information is an obvious folly,
and if you do that the consequences are your fault. The User Agents are
conforming with the pertinent specification whatever they as their User
Agent headers.
> If you dress up as a woman and do it very well,
> you shouldn't be surprised if guys hit on you
You have not understood why it is normal for web browser's UA strings to
spoof other browser's UA strings.
> If I'm a user that's sufficiently advanced enough to change my user
> agent string then I know what might
> happen.
Don't blame the user for the consequences of your mistakes. Your
'sufficiently advanced user' is quite capable of understanding that the
line they must not cross is violating HTTP. If they do that they should
have every expectation of things not working properly, but if they don't
then it is some other fool's fault when things go wrong.
> For all those default browsers, not only is it possible,
> it's very easy.
All you re saying is that you can distinguish a default configuration of
one common browser from a default configuration of another common
browser. And you can do that, but as you cannot know that what appears
to be a default configuration of a common browser actually is a default
configuration of that browser the ability to distinguish between them is
not the ability to identify them. It is accurately identifying the
browser and/or its version that is impossible.
> Besides, it's also very easy to detect browsers that are
> spoofing.
Is it? how would you discriminate NetFront or IceBrowsr from IE?
> All my sniffer code doesn't get fooled.
I know where I would be placing my money.
> Opera and Safari and NS8 are all detected properly, regardless
> of what spoof mode they're in.
You are deluded.
Richard.