bad coding practices - browser sniffing

VERIFIED INVALID

Status

Skywriter
General
--
major
VERIFIED INVALID
9 years ago
9 years ago

People

(Reporter: Immanuel S. Hayden, Unassigned)

Tracking

Details

(Reporter)

Description

9 years ago
User-Agent:       Opera/10.00 (X11; Linux x86_64 ; U; en) Presto/2.2.0
Build Identifier: 

browser sniffing is a really bad idea, esp. if the user can't override the check and continue without varity (hell, it's a simple "continue anyway" link, no magic) Hell, I can't even get in with Opera 10.0 weekly build because of this sh**.

also a modern product as bespin should not use browser sniffing at all, but feature detection and graceful degradation. Most users can also live with one or two missing features if their browser does not support it.

Reproducible: Always
(Reporter)

Updated

9 years ago
OS: Linux → All
Hardware: x86 → All
IMHO there is nothing wrong with using browser sniffing to warn users that the editor will not work, as long as there is a "try it anyways at my own risk, I know what I am doing" link somewhere :)
(Reporter)

Comment 2

9 years ago
Uhm, let's simply sum browser sniffing up from my perspective:
Project ... Bespin (or any other)

Pro:
- faster than feature detection
- easier to initially develop (simple string-matching stuff)

Contra:
- has to be administrated actively to keep the list up-to-date and also reflect changes in the project code (maybe a problematic function that stopped a browser from being in the list was rewritten). This means extra work in the long term, as many configurations have to be tested.
- Browser can disable certain features as JS, etc or parts of it. simple UA sniffing does not take this aspect into account
- new browser releases
  - Devs have to check new version for compatibility and update list
  - Project Release cycles may hinder early migration to new browser version, as the new browser version is not included in the outdated browser sniffing code until next release (esp. an issue if a project may die somewhen but still be used somewhere)
  - Strange browsers etc are not supported (elinks 4tw ;))
- string matching may not be as simple as thought: see http://my.opera.com/Andrew%20Gregory/blog/2008/05/11/opera-10-is-too-old which describes a faulty UA sniffing code that actually identifies Opera 10 as Opera 1!

Other ressource about feature detection vs browser sniffing: http://www.quirksmode.org/js/support.html

... also there currently is NO "continue anyway" button.

Comment 3

9 years ago
This is invalid, Bespin does feature detection, not browser sniffing. See http://hg.mozilla.org/labs/bespin/file/2e074fb23000/frontend/js/registration.js#l71
It doesn't really make sense to me to have a "continue anyway" button, since an editor that can't display text really isn't worth showing.
(Reporter)

Comment 4

9 years ago
k, you are right ... the text on the page just sounded like "hey, we just sniffed you" ;)

I'll mark this as solved or whatever then ^^
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → INVALID
This is indeed INVALID, so marking as VERIFIED.
Status: RESOLVED → VERIFIED
This is a mass migration from Mozilla Labs :: Bespin to Bespin :: General.

This bug likely still needs to be triaged and categorized.
Component: Bespin → General
Product: Mozilla Labs → Bespin
QA Contact: bespin → general
Target Milestone: -- → ---
Version: unspecified → 0.1.1
You need to log in before you can comment on or make changes to this bug.