IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Whatever
Feature sniffing? Sure.

But how do you detect the 2 pixel vertical positioning error? You can test for features by sniffing for them. But you can't find the bugs that way. You have to just know what you're dealihg with. So we do a lot of both.

But whatever. I doubt you could even get in where I worked.



[link|http://www.blackbagops.net|Black Bag Operations Log]

[link|http://www.objectiveclips.com|Artificial Intelligence]

[link|http://www.badpage.info/seaside/html|Scrutinizer]
New Re: Whatever

But how do you detect the 2 pixel vertical positioning error?

\r\n\r\n

Um... by testing?

\r\n\r\n

Seriously, there are dozens of browsers out there, but there are maybe four rendering engines that matter, all of which can be installed on a single computer if you've got a crappy testing budget. And 2-pixel positioning errors are much more a CSS problem than a JavaScript problem, so I don't see how JavaScript UA sniffing helps there. Unless you're using JS to compensate for CSS bugs, which is bound to bite you in the long run.

\r\n\r\n

But whatever. I doubt you could even get in where I worked.

\r\n\r\n

You assume that I'd want to ;)

\r\n\r\n

Regardless, I've talked to a few people who've worked for "the world's largest retailer" (hey wait, I thought that was Wal-Mart?) and generally the prognosis is Not Good.

--\r\nYou cooin' with my bird?
New Re: Whatever
"by testing?"

In the javascript? I don't see how I can tell from there that the thing has been drawn in the wrong place. But maybe you don't do applications and just do pages.

"And 2-pixel positioning errors are much more a CSS problem than a JavaScript problem"

They're still problems. I'm supposed to pretend the user doesn't see? Not when you are doing dynamic overlays and they have to sit in the right spot. So there is an object that is the "bug compensator" for positioning errors that is specific to user agent and all bug prone maniupulations are delegated to that. Ideally, that class would become empty call throughs - but in the real world there are hacks to make stuff work.

And how is your WebTV solution? You do handle that, right? WebTV gives you 544 x 372 pixels. The only way to tell is to look for webtv in the user agent - which is otherwise IE6. But, of course, if you're sure you can tell by sniffing around in the browser and can rejig your UI based on that, well cool for you. We just give them special pages.

"the world's largest retailer"

you left out "internet". World's largest internet retailer. I actually think the business with the longest legs is the S3/EC2 stuff. It is cool.



[link|http://www.blackbagops.net|Black Bag Operations Log]

[link|http://www.objectiveclips.com|Artificial Intelligence]

[link|http://www.badpage.info/seaside/html|Scrutinizer]
Expand Edited by tuberculosis Nov. 26, 2006, 01:41:51 PM EST
New Re: Whatever

In the javascript? I don't see how I can tell from there that the thing has been drawn in the wrong place. But maybe you don't do applications and just do pages.

\r\n\r\n

You go to your test machine, you fire up Browser X, and you look at a few examples of the effect in it. How does an "applications" versus "pages" distinction make a difference to that? Your application is, in all likelihood, going to be using some sort of templating, so the various types of pages will all look similar except for changes in content.

\r\n\r\n

That's how I test JavaScript stuff at work, and it's not all that hard really.

--\r\nYou cooin' with my bird?
New Uh yeah - so how do I compensate for it in the page?
Because, we check the user agent string to correct for it.



[link|http://www.blackbagops.net|Black Bag Operations Log]

[link|http://www.objectiveclips.com|Artificial Intelligence]

[link|http://www.badpage.info/seaside/html|Scrutinizer]
New Re: Uh yeah - so how do I compensate for it in the page?

CSS people have been compensating for bugs for years without doing UA sniffing ;)

\r\n\r\n

But this is largely a red herring; my point is simply that UA sniffing to determine what features you'll let the user see is, and ought to remain, dead. If it's the most efficient way to solve a CSS bug, then that's another story, but the question here is things like whether you send your CSS to the browser at all, not whether you send the fix for a 2-pixel rendering bug.

--\r\nYou cooin' with my bird?
New I mostly agree
but then there's that whole webtv thing again.




[link|http://www.blackbagops.net|Black Bag Operations Log]

[link|http://www.objectiveclips.com|Artificial Intelligence]

[link|http://www.badpage.info/seaside/html|Scrutinizer]
New Re: I mostly agree

WebTV needs to go on the garbage heap ;)

\r\n\r\n

There's a new incarnation of that idea being pushed at work, we had to basically set up completely segregated versions of our sites on subdomains with their own templating and whatnot to deal with it and send the users over there, because there's no way to detect it (thanks to the way it works, to a server it's indistinguishable from normal IE 6).

--\r\nYou cooin' with my bird?
New Couldn't you use your WAP page?
I'm assuming anyone who cares about early adopters is writing pages for people surfing on their cell phones. I would guess the pages you server up to them would also work (sorta) on WebTV, wouldn't they?
===

Kip Hawley is still an idiot.

===

Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats].
[link|http://DocHope.com|http://DocHope.com]
New Re: Couldn't you use your WAP page?

Not really; the TV stuff, because of the interface it uses, had a different set of requirements for visual presentation. Which, fortunately, is really easy to do; one of my co-workers [link|http://www.postneo.com/2006/07/26/acknowledging-the-mobile-web-with-django|wrote up how we handle this sort of thing] for our mobile sites.

\r\n\r\n

Edit: I should probably also take this moment to pimp Matt's talk from PyCon on [link|http://postneo.com/talks/pycon2006/|mobile development with Python].

--\r\nYou cooin' with my bird?
Expand Edited by ubernostrum Nov. 27, 2006, 12:32:12 AM EST
New Re: I mostly agree
WebTV needs to go on the garbage heap ;)


OK, there we completely agree. However, I believe there is a 'webtv' in the user agent string if you look for it.

Failing that, you can do a screen size check in js and redirect them.




[link|http://www.blackbagops.net|Black Bag Operations Log]

[link|http://www.objectiveclips.com|Artificial Intelligence]

[link|http://www.badpage.info/seaside/html|Scrutinizer]
New Re: I mostly agree

Unfortunately, it's not actually WebTV, it's a WebTV-alike. I'll go poke at logs sometime this week, but I seem to recall that one of its major annoyances was not advertising itself in its UA string, and instead trying to be as much like IE6 as possible.

--\r\nYou cooin' with my bird?
New On a more serious note, though

User-agent sniffing is just asking for problems. There's a reason why pretty much every notable person in the JavaScript world gave up on it a long time ago.

\r\n\r\n

Another real-world example: suppose that you decide to use UA sniffing to determine whether you use the pre-iE7 ActiveX implementation of XMLHttpRequest or a native browser class (though IE7's XMLHTTPRequest isn't exactly "native", even though it behaves that way. Sort of.). So what do you do? If you look for "MSIE" in the UA string, you're likely to start throwing errors in Opera because it has a nasty habit of sending an IE UA string. Similarly, plenty of users of Mozilla-based browsers intentionally set their UA string to IE's to get around stupid browser-sniffing tricks.

\r\n\r\n

The result is that any AJAX stuff you were doing stops working for a not-insignificant number of people who might otherwise have been paying customers. User-agent sniffing has been dead since 1995, when IE started including "Mozilla" in its UA string, and has only gotten deader since -- Safari, for example, includes "Gecko" in its UA string.

\r\n\r\n

Which leaves you with, well, object detection. Want to know how to do XMLHttpRequest? Ask the browser whether it has a native object for that; if not, ask if it has an ActieX implemention. If the browser fails both those tests, it can't do XMLHttpRequest and you either need to fall back to other tricks (like iframes) or give up and force full-pagse reloads on the user. And in the long run, this is simpler than maintaining a massive list of compatible UA strings, and more effective -- when a new browser comes out, you don't have to update all your JavaScript.

\r\n\r\n

Or does "the world's largest retailer" not care about missed sales due to easily-corrected coding mistakes?

--\r\nYou cooin' with my bird?
Expand Edited by ubernostrum Nov. 26, 2006, 02:56:22 AM EST
New I think Todd's made his argument poorly.
Object detection gets you perhaps 96% of the way. Unfortunately, that's not close enough for where Todd used to work. Some odd behaviours are not detectable by object detection; but since they correspond to particular broswer versions, they are reliably detectable (very much most of the time) by some very specific tests in specific orders, some of which are user-agent tests. It's ugly, but it's necessary because there's no other way to know which rendering bugs you have to workaround. (I'd refer you to www.quirksmode.org, but it's not as pleasant to rummage in as it used to be.)

Wade.
"Don't give up!"
New The sniffing happens on the server
and has little to do with javascript.

There are often features developed with only a couple browsers in mind - only those browsers get those features. Largely because they are experimental features to test a hypothesis and there isn't time for extensive testing. If the feature tests well, more work goes into adding browser support.

The other, as I mentioned, is bug mitigation. Every browser string has something unique in it that can be used to concretely identifiy the browser unless it is spoofing. We look for that when determining browser support.

The javascript code itself uses feature detection mostly. The set of browsers used for development is the 99% I mentioned. We found that, when attempting to implement something, it can take some effort to find a technique that works on all of the browsers. For instance, you can't hide a component in Safari by just setting display=none. Instead you have to set its size to zero. If we didn't develop using Safari, we wouldn't find the magic technique that worked around this quirk and we wouldn't have any confidence that our app worked in Safari at all. So on the server, we'd exclude Safari from the set that might get this treatment - unless there was time to test it.

We didn't include opera in the mix during development and when we tried our app on it, it looked awful. Lacking resources and financial justification to do the work, we didn't include opera in our browser tests and gave them the web 1.0 experience.

Does that make it clearer? If we didn't test it, it doesn't get the cutting edge treatment, it gets the old safe one. The test isn't looking for mozilla in the string, it is looking at the whole string and finding the unique bit that only that browser sends. Spoofers have no right to complain and none of them ever have to my knowledge.




[link|http://www.blackbagops.net|Black Bag Operations Log]

[link|http://www.objectiveclips.com|Artificial Intelligence]

[link|http://www.badpage.info/seaside/html|Scrutinizer]
New Re: The sniffing happens on the server

If we didn't test it, it doesn't get the cutting edge treatment, it gets the old safe one. The test isn't looking for mozilla in the string, it is looking at the whole string and finding the unique bit that only that browser sends. Spoofers have no right to complain and none of them ever have to my knowledge.

\r\n\r\n

Except that's still somewhat backwards. There are lots of browsers out there that aren't Firefox, but will render pages identically because they're using Gecko. You don't need to test against all of them to know they work. Similarly, there are lots of browsers out there embedding WebKit/KHTML which will render identically to Safari, but you don't need to test against all of them to know they work.

\r\n\r\n

Yahoo has an interesting methodology for this which I think is about the least offensive use of browser sniffing I've seen; they study each release of a major browser (IE, Firefox, Safari, Opera) and assign it a "grade" depending on its support for advanced stuff. Then their scripts, instead of being marked "this is only for Internet Explorer 6" or "this is only for Safari 2", can be marked "this is only for Grade A browsers" or "this is only for Grade C".

\r\n\r\n

The important thing, though, is that they have a class called "Grade X". Browsers which have been thoroughly tested and proven to support advanced features are Grade A, and browsers which have been tested and proven not to support advanced features are Grade C. Everything else is Grade X, and Grade X browsers are assumed to have the same or more advanced capabilities than Grade A -- generally, they assume that an unknown UA string represents a new version or a major browser, or a new browser embedding a major rendering engine. Thus, instead of a whitelist of "known good" browsers, they have a blacklist of "known bad" and assume that anything else can handle advanced features. This is much more likely to be correct than the techniques used at, say, Google where I've got some pretty advanced browsers that they won't serve GMail to.

\r\n\r\n

And of course, their JS libraries use object detection all over the place, so that system seems to come into play only rarely.

--\r\nYou cooin' with my bird?
New Re: The sniffing happens on the server
The important thing, though, is that they have a class called "Grade X". Browsers which have been thoroughly tested and proven to support advanced features are Grade A, and browsers which have been tested and proven not to support advanced features are Grade C. Everything else is Grade X, and Grade X browsers are assumed to have the same or more advanced capabilities than Grade A -- generally, they assume that an unknown UA string represents a new version or a major browser, or a new browser embedding a major rendering engine. Thus, instead of a whitelist of "known good" browsers, they have a blacklist of "known bad" and assume that anything else can handle advanced features.


Except that strategy has the known drawback of producing lower revenues and higher trouble ticket counts. So I guess it depends on your goals.

When yahoo's users get browser errors - it doesn't cost them money directly. You can't correlate browser errors with lost revenues directly like you can on an eCommerce site. So while I agree with you in principle, reality has reared its ugly head in some instances and pragmatics won out.



[link|http://www.blackbagops.net|Black Bag Operations Log]

[link|http://www.objectiveclips.com|Artificial Intelligence]

[link|http://www.badpage.info/seaside/html|Scrutinizer]
New Re: The sniffing happens on the server

Except that strategy has the known drawback of producing lower revenues and higher trouble ticket counts. So I guess it depends on your goals.

\r\n\r\n

Depends on how careful you are producing your "known bad" list, and heavily depends on the user. If, for example, Amazon ever "degraded" the page they send me because I'm using a new-ish Gecko or WebKit browser that isn't in the approved UA list, you can bet that'd be a lost sale for Amazon.

\r\n\r\n

The existence of good, open-source rendering engines has basically turned this whole thing on its head; years ago it was better to assume that a new browser was deficient. But today, on average, it's better to assume that a new browser is embedding someone else's engine and is thus as capable as the well-known browsers.

\r\n\r\n

(all of this, of course, ignores larger issues like progressive enhancement and graceful degradation, which are just as important and make UA sniffing even more irrelevant)

--\r\nYou cooin' with my bird?
Expand Edited by ubernostrum Nov. 26, 2006, 05:05:33 PM EST
Expand Edited by ubernostrum Nov. 26, 2006, 05:05:47 PM EST
     Now using IceWeasel, nice. - (folkert) - (27)
         Firefox in drag - (tuberculosis) - (26)
             Firefox OUT OF DRAG. - (folkert) - (25)
                 DFSG - (tuberculosis) - (24)
                     It works exactly like Firefox... - (folkert) - (1)
                         They all say that - (tuberculosis)
                     Re: DFSG - (ubernostrum) - (21)
                         User agent sniffing - (tuberculosis) - (19)
                             Re: User agent sniffing - (ubernostrum) - (18)
                                 Whatever - (tuberculosis) - (17)
                                     Re: Whatever - (ubernostrum) - (10)
                                         Re: Whatever - (tuberculosis) - (9)
                                             Re: Whatever - (ubernostrum) - (8)
                                                 Uh yeah - so how do I compensate for it in the page? - (tuberculosis) - (7)
                                                     Re: Uh yeah - so how do I compensate for it in the page? - (ubernostrum) - (6)
                                                         I mostly agree - (tuberculosis) - (5)
                                                             Re: I mostly agree - (ubernostrum) - (4)
                                                                 Couldn't you use your WAP page? - (drewk) - (1)
                                                                     Re: Couldn't you use your WAP page? - (ubernostrum)
                                                                 Re: I mostly agree - (tuberculosis) - (1)
                                                                     Re: I mostly agree - (ubernostrum)
                                     On a more serious note, though - (ubernostrum) - (5)
                                         I think Todd's made his argument poorly. - (static)
                                         The sniffing happens on the server - (tuberculosis) - (3)
                                             Re: The sniffing happens on the server - (ubernostrum) - (2)
                                                 Re: The sniffing happens on the server - (tuberculosis) - (1)
                                                     Re: The sniffing happens on the server - (ubernostrum)
                         Re: DFSG - (pwhysall)

Powered by the Casimir effect!
137 ms