bad coding practices - browser sniffing



10 years ago
10 years ago


(Reporter: elmano, Unassigned)





10 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


10 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 :)

Comment 2

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

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

- 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 which describes a faulty UA sniffing code that actually identifies Opera 10 as Opera 1!

Other ressource about feature detection vs browser sniffing:

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

Comment 3

10 years ago
This is invalid, Bespin does feature detection, not browser sniffing. See
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.

Comment 4

10 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 ^^
Last Resolved: 10 years ago
Resolution: --- → INVALID
This is indeed INVALID, so marking as 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.