W3C home > Mailing lists > Public > www-style@w3.org > March 2004

Re: @useragent (was Proposal: version at-rule)

From: Felipe Gasper <fgasper@freeshell.org>
Date: Thu, 25 Mar 2004 20:33:32 -0600
Message-ID: <4063967C.6020308@freeshell.org>
Cc: www-style@w3.org

Allowing an explicit user agent at-rule flies in the face of the 
principle of coding for a generic standard rather than specific user 
agents, which I believe, is much of the reason why there are W3C 
standards at all.

Having this would also encourage browser makers to say "well, our 
browser has this quirk, but rather than us take the time to fix it, why 
don't you just use the at-rule that we *do* support?"

Browser sniffing is a necessary evil, but I think codifying what, by its 
very nature, is a hack into official specifications is a pretty bad idea.

-Felipe Gasper

Quoth Lachlan Hunt on 3/25/2004 6:34 PM...

> Chris Moschini wrote:
>> So - how about being able to place a set of rules in an @useragent 
>> block, a la:
>> @useragent( "MSIE", 6 ) {
>> /* rules here */
>> }
> <snip/>
>> This sort of checking is discouraged but is sometimes essential in the 
>> Javascript world - why not learn from success?
>   Success?  AFAIK, browser sniffing with javascript has never been 
> totally successful when it's checking for strings like "MSIE" or 
> "Netscape", which is exactly what your CSS proposal is doing.  Try 
> viewing the Microsoft Office [1] website with Mozilla for a good example 
> of the kind of mistakes browser sniffing can make.  The following 
> warning is presented because of this poor browser sniffing:
> “Warning: You are viewing this page with an unsupported Web browser. 
> This Web site works best with Microsoft Internet Explorer 5.01 or later 
> or Netscape Navigator 6.0 or later. Click here for more information on 
> supported browsers.”
>   IMHO, if standards compliant coding is used, browser sniffing *should* 
> never be required.
> [1] http://office.microsoft.com/home/default.aspx
Received on Thursday, 25 March 2004 21:33:36 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:12 UTC