Serve different JS files, depending on browser support?

Axel Rauschmayer axel at
Thu Sep 5 04:27:59 PDT 2013

In principle, you could serve different files to different browsers:

– Browser supports ES6 => serve an ES6 .js file
– Otherwise => compile ES6 to ES5 (or ES3)

What is the best way to do this?

– Browsers tell servers their level of ECMAScript support?
– You can do a feature detection in JS and then load modules conditionally? But that seems like a more complicated solution. I’m not even sure how I would implement the detection part.

Dr. Axel Rauschmayer
axel at


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list