Hello Lachlan,

Thank you for your considerate reply.

This idea was conceived one day when I had "finished" a site I was building 
for a client and it was pixel-perfect in everything... but then a bug reared 
its ugly head when I did a final test in Opera (8.5 if I recall).

You are absolutely correct in stating that using a fall-back like this 
doesn't address the real issue: namely a broken style somewhere. At the 
time, though, I was frustrated. A solid fix for Opera broke the design in 
other browsers causing me grief when I thought the job was done-done. 
Everything I tried caused a nasty chain reaction. One of those "Grrr" 
moments if you know what I mean. I remember muttering to myself that *I sure 
wish there were conditional comments for Opera* (gotta hand it to IE for 
perfecting that).

Since I'm aware of no other method used by Opera, the PHP browser sniffer 
was born and I could dish out a one-liner for Opera, fix my problem, and get 
on with my next project. I ended up doing a slew of them in the experiment 
as sort of a repository just in case. A last resort.

_Most_ of my newer sites don't use any additional style sheets or hacks 
Either I've gotten handy with CSS or I'm just getting lucky. This was one of 
those moments I drew a four of clubs instead of the ace of spades so I 
grabbed the deck and dealt myself a new card. ;-)

Respectfully,
Mike Cherim




----- Original Message ----- 
From: "Lachlan Hunt" <[EMAIL PROTECTED]>
To: <wsg@webstandardsgroup.org>
Sent: Friday, October 27, 2006 10:30 PM
Subject: Re: [WSG] PHP Browser Sniffer Test for Mac FF 2.0


Mike at Green-Beast.com wrote:
> For crying out loud, it's my experiments site where I fool around with
> stuff. I'm not telling anyone to use this stuff...

Woah!  Calm down, I wasn't attacking you or your right to publish it,
just questioning it's usefulness.

> Of course all of this is written on the site so I'm really just repeating
> myself.

Perhaps I should rephrase my question.  I can clearly see from the site
that the intention is to allow authors to send alternate stylesheets to
specific browsers, but when and why would that be a good idea, given
that there are other more reliable techniques available?

> That said, I don't see where detecting OSs/browsers to deliver a specific
> styles in a pinch using PHP is outdated.

Browser sniffing has a very long history of abuse.  Traditionally, one
of the major problems with it is that authors generally only sniffed for
the 2 or 3 major browsers of the time and effectively ignored everything
else, often with significant consequences for the user.  Granted, it is
possible to use it responsibly, but like anything, it can be, and has
been, significantly abused.

Newer and more reliable techniques are available for many things, like
conditional comments for IE.  In a way, CCs could be considered a form
of browser sniffing, but, unlike sniffing the UA string, their
reliability is effectively guaranteed, since no other browser supports
conditional comments (except for NN4, but that used a different syntax).

Besides, if you find yourself hacking for anything but IE, generally
speaking, it's a good indicator that you need to rethink your approach.

> It seems to me it's a quick and easy solution if someone gets stuck
> as I describe on the script text page and in the summary.

That's another problem with it.  Because it's so quick and easy to do
browser sniffing, it's easy for authors to ignore the real problem and
just focus on a quick and dirty hack like this.  In so many cases, a
hack-free solution is available and is always a much better alternative.

> I know I'm busy and really lack the time and energy to defend
> my having an experiments site on the web and trying to learn stuff.

Your experimental site is not the issue, you don't have defend it.  This
discussion just about the merits of one particular technique.

> I know you're a real popular man, and all that, but you seem to come 
> across
> aggressively at times.

My apparent popularity is irrelevant, we're all equals here.  I really
didn't mean to be aggressive.  However, having re-read what I wrote, I
can see how it could be taken that way, and for that, I apologise.

-- 
Lachlan Hunt
http://lachy.id.au/


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to