Hi Tobie,

On 11/29/06, tobie <[EMAIL PROTECTED]> wrote:
>
> > Browser sniffing in general is the problem
> >
> > http://jibbering.com/faq/faq_notes/not_browser_detect.html
> >
> > navigator.userAgent should be avoided like the plague. The only
> > exception I've been able to think of is if I want a border to be red
> > in IE and blue in Safari and I don't really care if it is red or blue
> > in either browser. That is, I don't care if navigator.userAgent is
> > lying.
> >
> > Peter
>
> In an ideal world: yes. Unfortunately, it is a necessity when object
> detection is not possible (usually when a method or property exists but
> gives incorrect values)...

There are many times when people think feature detection is not
possible but it is. It is hard work to avoid browser sniffing
sometimes but in a core JavaScript library I think navigator.userAgent
should be out unless there is some extreme situation encountered and
then a big warning in the docs should be put in place.

> and can also be a pragmatic design decision
> when speed is an issue.

When speed is an issue and the client knows the tradeoffs then
navigator.userAgent may be a useful tactic.

Peter

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to