Yahoo! and the evils of Vendor/Version Browser Detection

Vendor/Version browser detection strikes again!

When attempting to view the new Yahoo! home page in the development version of of Firefox 2 (also known as Bon Echo), I was presented with the following lovely page:

New Yahoo! Homepage in Bon Echo

If Yahoo! had made the requirement to be any Gecko-based browser based on branch 1.8 or later (which includes Firefox 1.5), then I would have been able to see their new design without having to fudge my user agent.

If you must restrict access to specific Gecko versions, use something like getGeckoRv() which can be used to detect the version of a Gecko-based browser independently of its branding or vendor/version.

/bc

MSNBC and the evils of Vendor/Version Browser Detection

bug 334957 is an example of the evils of Vendor/Version browser detection in action.

MSNBC uses a script to implement their pull out menus using DHTML. The menu works fine in IE and Firefox, but fails in Camino, and the recent developer builds of Firefox such as Bonecho (Firefox 2) and Minefield (Firefox 3) as well as Safari due to Vendor/Version browser detection.

The support droids at MSNBC claim that they since they support 99% of browsers and only support released browsers, there is nothing they can do to fix their script.

How ironic since their stupidity forces browsers like Epiphany (a browser which embeds Firefox on the Gnome desktop in Linux) to include Firefox in their user agent strings which artificially inflates the reported marketshare of Firefox.

You may be interested to know that in order to support any Gecko-based browser with their pull-out menus, all they would have to do is change

nm_bFM = ((nm_bWin && nm_nIE >= 5.5) ||
(sUa.indexOf("Firefox") > 0)) &&
(sOTyp != "static") && (sOTyp != "javascript");

to

nm_bFM = ((nm_bWin && nm_nIE >= 5.5) ||
(nm_nNN >= 6)) &&
(sOTyp != "static") && (sOTyp != "javascript");

As an added bonus, this would allow the menus to work in Safari.

Remind me to blog about MSNBC’s policy of requiring Internet Explorer to view Videos even though other news sites support Firefox. Freedom of the press… hah!

/bc

Test Automation for Firefox and Thunderbird

I have started a thread in mozilla.dev.quality (nntp|Google Groups) on an automated testing project for Firefox and Thunderbird. Topics include:

  • Execution Environment
  • Directory Paths | CVS Locations
  • Nightly Build Installation
  • Building
  • Profile Creation and Initialization
  • Test Invocation
  • Result Reporting

If you have experience with automated testing frameworks and are interested in helping out, please join the discussion.