3 ms·
https://cdn.polyfill.io/v3/url-builder/ https://cdn.polyfill.io/v3/url-builder/ is pretty great for this, it'll detect the browser user agent and send down the
by skrebbel 5y ago
https://cdn.polyfill.io/v3/url-builder/ https://cdn.polyfill.io/v3/url-builder/ is pretty great for this, it'll detect the browser user agent and send down the right polyfill. Ie on modern browsers it'll send down an empty response.
- capableweb 5y agoWell, great sometimes. Not great if you don't trust a random 3rd party to host essential client-side code for you or if you don't feel like running yet another, maybe unsupported in the future, service for the next X years.
- Svenskunganka 5y agoYou can always self-host it: https://github.com/financial-times/polyfill-service https://github.com/financial-times/polyfill-service
- skrebbel 5y agoTrue. We have an "if IE then emit polyfill.io <script> tag" call in the backend, which limits the security surface area to IE and also prevents an otherwise unnecessary extra HTTP request (we only use it for Intl). We feel that's a reasonable middle ground. If I'd use it for all polyfills (which we should maybe consider!), we'd likely self-host the service.