It looks like using an approach like Modernizr relies on downloading the detection code, running it, and then potentially kicking off additional downloads for polyfills. Or it would mean eagerly downloading polyfills on browsers that don't need them. In the former case, you pay the cost of a second network request, especially in older browsers that don't support HTTP/2, and in the latter case, you send a potentially large number of bytes of polyfill code to clients that don't use them. What makes using a browser's agent string an anti-pattern?