News for hackers. Stuff that matters.
Re:Let's use more of Firefox, only YOU can stop Chrome from ... by werkjohann on Saturday June 27, 2020 @12:48AM (#23659584)
Feature detection (once called “object detection”) has been considered best practice over user agent sniffing for at least 15 years now: https://web.archive.org/web/20040331111240/https://developer...
Re:Let's use more of Firefox, only YOU can stop Chrome from ... by bichiliad on Saturday June 27, 2020 @01:21AM (#23659702)
Both is a better option; sending polyfills for every browser feature you'd want to use is easily hundreds of kilobytes. We use user agents to identify a feature set, but we send feature detection down alongside the polyfills. Detecting features in the client side and sending a second network request to load polyfills for that features adds pretty significant round-trip time.