|
Posted by Michael Winter on 11/26/05 01:01
On 25/11/2005 21:54, Onideus Mad Hatter wrote:
> On Fri, 25 Nov 2005 13:28:14 GMT, Michael Winter
> <m.winter@blueyonder.co.uk> wrote:
[snip]
>> No, the technique is flawed; it isn't reliable.
[snipped comments]
You do realise that the User-Agent header (and userAgent string) is
forged, don't you?
When clueless authors start using browser detection badly (and many do),
it is often necessary to fake the string revealed to scripts. Some
browsers suffer from this so routinely that they always forge the value.
A simple example is Opera, which reports a string similar to that of IE
by default. Though it's very simple to distinguish the two, thankfully
some fail to do so and so the user is spared idiotic messages like,
"This site is designed for Internet Explorer only." That said, other
browsers fake the value perfectly, so it is not possible to tell them
apart from the real thing.
Though the OP's case is a possible exception, a competent script author
will rarely ever need to know what browser their script may be running
in as it doesn't tell them what they actually need to know (at least not
in an extensible, easily maintainable manner).
Mike
--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Navigation:
[Reply to this message]
|