3 ms·
Are you encouraging people to do browser sniffing accurately? Aren’t we supposed to discourage such sniffing instead?
by kccqzy 9y ago
Are you encouraging people to do browser sniffing accurately? Aren’t we supposed to discourage such sniffing instead?
- BHSPitMonkey 9y agoYou can still want to parse UAs for other reasons. I used such a library recently in a project where a user is shown their login history, including what OS and browser was used, in a human-readable format (e.g. "Firefox 58 on Linux").
- paulddraper 9y agoIdeally, you would not care at all. You would simply develop HTML 4/5/6 a user has a browser that supports that spec. In reality, browsers have known bugs that last for years, you need to collect stats to figure out support policies, and you need to reproduce customer bugs. Example: old versions of Firefox have an RCE vulnerability if you use third party jsonp apis. If you use these apis but don't block these ff versions, your users will be vulnerable.
- phamilton 9y agoExactly. I had to deal with this due to Chrome 45 blocking flash[0]. While that might not seem like something worth targeting specific browsers, Chrome's implementation of blocking flash was an advertiser's worst nightmare. In order to render the page properly, the page would load with flash enabled on all content. It would then pause the flash runtime on all content not deemed "important". This had the wonderful effect of giving a video ad enough time to start playing a few frames and to fire the impression that results in the advertiser getting billed for showing the ad. This would be flat out fraud on our part (a major video ad exchange), so we had to aggressively avoid allowing flash ads to buy spots from chrome 45 and later. We used ua-parser and everything went very smoothly. [0] https://www.infoq.com/news/2015/08/chrome-45-flash https://www.infoq.com/news/2015/08/chrome-45-flash
- deleted 9y ago[deleted]