[thelist] RE: Mozilla 0.9.9 is out

Mark Howells mark at mountain.ch
Tue Mar 12 16:24:00 CST 2002

>> I'd also think about changing your logic so that you use
>> one global stylesheet for everything except NN4. You'll
>> run into a lot of problems if you check the User Agent
>> name, as Opera often identifies itself as IE and other
>> browsers, such as AOL, may identify themselves as
>> something totally different than a standard browser.
> masquerading as another browser or not, the substring "opera" is
> *always* in opera's user_agent string.  so, searching for that first
> and then searching for msie, gecko, etc. next will give you the results
> you want.

I know that's the case with Opera, but I was thinking more of "special"
implementations like the AOL browser. I've never seen an AOL user agent
string in three years of web stats for my site, and I know that people
with AOL browsers visit. The (admittedly very difficult) goal of one
stylesheet for all is what I'm trying to achieve--in the three CSS
versions I use at my site, I serve one advanced stylesheet to all
browsers except NN4 and the layout works just fine. That's just an
example, and I realize that some design can't manage the same, but
"if(ie6){//do stuff}" isn't a robust or efficient way of coding.

Mark Howells

More information about the thelist mailing list