People that know how to change their user agent string will most
likely know the possible results of doing so. I don't buy into the
notion that we have lots of people changing their user agent string.

--
Brandon Aaron


On 10/9/06, Sam Collett <[EMAIL PROTECTED]> wrote:
> On 09/10/06, Brian Miller <[EMAIL PROTECTED]> wrote:
> > I'm inclined to disagree.
> >
> > I believe that one should use object detection for cases in which they are
> > invoking that object for it's functionality.  A prime example is the XHR
> > (although MS may be messing around with that in IE7).
> >
> > But, if one is best served by simply knowing what browser we are dealing
> > with, one should absolutely use the user agent string.  It's where the
> > browser vendor *tells you* what browser it is.  Why hack around, when the
> > vendor is telling you what you need to know?
> >
> > For example: you need to apply a hack to get around one of IE6's infamous
> > layout bugs, when dealing with a dynamic web application.  Are you going
> > to test for XHR or window.clipboardData?  No, you ask the browser what
> > browser it is.  If it's IE6, (or IE 5.5 if the bug is there, too), code
> > for that instance.  We should avoid being obtuse in our code.
> >
> > Summary:
> > 1. Use object detection to detect objects, when you don't have to care
> > what browser you're using, as long at the object exists and will do what
> > you want it to.
> >
> > 2. Use the user agent string when you're more interested in what browser
> > you're actually using (by name) than you are in whether or not that
> > browser has a specific object available.
> >
> > - Brian
> >
>
> So what do you do in the case when the user agent string has been
> changed (all browser vendors allow it to be changed)? I just don't
> completely trust what the user agent string returns.
>
> I am testing for objects, but these objects are unique to each
> browser. You could say it is abusing the objects (i.e. not using them
> for what they are intended for).
>
> There is no foolproof solution to browser detection though.
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to