Minimal JavaScript Browser Fingerprinting

If you, like me, enjoy pointless JavaScript challenges, then this is your place.

The task is to write a Javascript function that returns the current Browser name.

You need to support at least Chrome, Firefox, Safari and IE.

The Rules

  1. The JavaScript expression needs to return the strings 'Chrome', 'Safari', 'Firefox' or 'IE' in the respective browsers.
  2. More explicitly, we are using the following browsers to confirm and expect these outcomes:
  3. It needs to support at least those 4 browsers.
  4. Honorable mention if it supports more browsers.
  5. It needs to run in any kind of JavaScript context that has a window.
  6. Bonus points if it does all that in Worker environments.
  7. The shortest expression wins

Submissions

  1. Yours truly, @freddyb with 83 characters (October 13th)
  2. You?

Please send your submission to fbraun@mozilla.com or message to @freddyb on twitter.