Hacker News new | ask | show | jobs
by dumbmatter 2600 days ago
Sometimes there are browser bugs that are impossible to do feature detection for, in which case have no better option than looking at the user agent.

For instance, several versions of Firefox had a serious bug in shared workers, which appeared intermittently when users opened your site in multiple tabs https://stackoverflow.com/questions/51092596/feature-detecti... - I had to use the user agent to work around this.

1 comments

Sure, this is a fair use case. But then can't the browser tell the end user that someone wants to read this browser data so the user has a chance to say "no"?
Changing user-agent is virtually always possible, though a vanishingly small fraction of users will do so.

Bundling into adblockers or browsers directly would help.