this post was submitted on 21 Nov 2023
380 points (89.7% liked)

Firefox

17602 readers
390 users here now

A place to discuss the news and latest developments on the open-source browser Firefox

founded 4 years ago
MODERATORS
 

Edit: Replies to this thread indicate this is not fully correct as it exists on all browsers; and is likely an ad thing.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 10 points 10 months ago (13 children)
[–] [email protected] 18 points 10 months ago* (last edited 10 months ago) (10 children)

Browser detection is rarely done through User Agent lookup anymore. Nowadays we determine browser through feature detection.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#avoiding_user_agent_detection

[–] [email protected] 3 points 10 months ago (1 children)

Yeah, but some amount of the time is just easier to rely on the user agent. Why bother with the fancy logic when user agent spoofing, adblocking Firefox users is a % of a % of a %?

[–] [email protected] 2 points 10 months ago* (last edited 10 months ago)

I tend to agree. I think there's little need as a developer to go that extra mile for accurate browser detection without UA unless it's for fingerprinting. Most feature sets are supported and where it isn't you have a polyfil or whatever shim to make it work. So in the case of fingerprinting you try not to rely fully on anything the user can alter easily.

load more comments (8 replies)
load more comments (10 replies)