There's a website, polyfill.io, that does browser sniffing and sends a minimal polyfill. The source is available under the MIT license[1], it shouldn't be a tremendous amount of work to set up a bunch of different builds for different features levels, with a server in front responsible for sending the correct bundle.
What you just described is what I always describe as the ideal web deployment system. Most of my dev is in C++, but I couldn't believe the inefficiency found in sniffing everything at runtime versus using what already exists to serve up different pre-compiled targets specifically optimized for all the major browser versions active in the field. It seems that products like this that span the dev workflow (compilation) / operational (sniffing server) gap are hard to get off the ground since many devs can't touch the ops side.
Comments
There's a website, polyfill.io, that does browser sniffing and sends a minimal polyfill. The source is available under the MIT license[1], it shouldn't be a tremendous amount of work to set up a bunch of different builds for different features levels, with a server in front responsible for sending the correct bundle.
[1]: https://github.com/Financial-Times/polyfill-service/blob/mas...
What you just described is what I always describe as the ideal web deployment system. Most of my dev is in C++, but I couldn't believe the inefficiency found in sniffing everything at runtime versus using what already exists to serve up different pre-compiled targets specifically optimized for all the major browser versions active in the field. It seems that products like this that span the dev workflow (compilation) / operational (sniffing server) gap are hard to get off the ground since many devs can't touch the ops side.