3 ms·
I think some of the complaints in the article were about websites using User Agent string to detect compatibility, rather than individual feature sniffing. In
by thephyber 2y ago
I think some of the complaints in the article were about websites using User Agent string to detect compatibility, rather than individual feature sniffing.
In that small complaint, I would agree. But I think the fault is mostly with the website owners, not with the browser.
- robocat 2y ago> rather than individual feature sniffing Feature sniffing generally doesn't work for anything interactive. Many bugs in controls, animation, events are not sniffable. Yet developers still need to deliver workarounds. Feature sniffing works best for static HTML documents - and even then the code to actually do the sniffing can be demonic code (a side-effect or correlation or an obscure discovery). Using just feature sniffing is a great goal but it simply isn't a perfect solution. I do believe us developers should avoid parsing user agents unless there is no other good solution (never a crutch for lazy bad developers). And detecting the browser for obsolete browsers is usually a perfectly fine solution. The bugs won't get fixed and the browser won't change. There are exceptions of course!!!
- thephyber 2y ago> And detecting the browser for obsolete browsers is usually a perfectly fine solution. But there are a long tail of user agents and the average web developer does a terrible job at identifying those in the long tail. My password manager on iOS uses the newest Safari engine, but all websites think it is an outdated/obsolete browser because it uses a user agent string they don't recognize. Also, my bank doesn’t use highly interactive features you mention. It’s almost exclusively links, forms and a little validation JavaScript. Feature sniffing would have been a much better experience.