Unobtrusive JavaScript: Now it has come to this!

[quote=“felgall, post:41, topic:224661, full:true”]
With the exception of capturing browser statistics (where you know the results will not be completely accurate) scripts should never test the useragent value as a part of their processing - any script that does is using a technique that was obsolete in Netscape 2 when feature sensing was introduced.[/quote]

Yes indeed, feature detection is a much more reliable way of providing support for different browsers.
.
Perhaps more controversial than that, is to do no detection and allow less capable browsers to fail.

2 Likes

Is that more or less controversial than using browser sensing and allowing more capable browsers to fail?

Is that still a thing?

I remember many years ago while using Opera some sites would give a
“Please upgrade your browser to IE5 or Netscape” type of message and the site was otherwise completely unusable.

Yet if I set Opera to identify itself as IE the site seemed to work perfectly fine.

At the time I was inclined to think it was some kind of anti-Opera conspiracy (The Truth Is Out There), but now I’m guessing the sites had some JScript code that didn’t have anything to do with user experience, they didn’t want to bother having good code, or they didn’t know what they were doing.

Well it is why I can’t get Gmail to work unless I turn off JavaScript.

I think that’s the case with the people Google employ to write JavaScript.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.