- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Wed, 12 Feb 2014 10:12:37 -0500
- To: public-html@w3.org
On 2/12/14 4:47 AM, Predrag Stojadinovic wrote: > ·What is gained by not allowing web developers to detect the browser > which their code is going to be executed in? What's gained is them not misusing the information, which is the common case when they do get it. > ·Why is such detection implied to be "bad behavior"? See <http://www.joezimjs.com/javascript/feature-detection-vs-browser-detection/> or the "Browser detection" section of <http://msdn.microsoft.com/en-us/magazine/hh475813.aspx>. > ·What is gained by protecting browsers that do not provide established > standards? I'm not sure what you're asking; you seem to be making an assumption here that just isn't valid? > ·What is gained by not allowing the developers to inform their users > that some of the state of the art features will not be available and > that they should install another browser in order to have them? This is already allowed. It just doesn't need browser detection; it needs feature detection. > If IE was not subpar then it would not have been, as you put it, > "targeted" by browser detection. This is not an IE-specific problem. Every single browser on the market has suffered from this; my primary experience is with Gecko/Firefox but I'm sure others have similar experiences to share. And it's not even limited to browsers. You may want to read <http://weblogs.mozillazine.org/bz/archives/2011/10/>; that sort of thing happens with browser detection all the time. Or if you want some more examples of this failure mode, how about <https://bugzilla.mozilla.org/show_bug.cgi?id=217844> (where it was sniffing for "Netscape" and therefore didn't work right in "Mozilla" or "Firefox") or <https://bugzilla.mozilla.org/show_bug.cgi?id=330418#c1> where it was trying to do something with different Gecko versions and broke on Jan 1 of every year for several years in a row. > Please provide justification for Your claim here? I hope the above links help. > For example, the appCodeName and product attributes are completely > useless. They each have one single fixed predefined value, so what’s the > point of even querying them? There is none, for new pages. The only reason they exist is that there are old pages, going back 15-20 years now, that query them and then do something based on the values and that will fail in a modern standards-compliant browser if it returns the wrong values, because they're trying to work around some random bugs of browsers from 1995. -Boris
Received on Wednesday, 12 February 2014 15:13:06 UTC