September 9th, 2024

The State of ES5 on the Web

Philip Walton's analysis reveals a shift away from ES5 due to discontinued IE 11 support, with many websites now using untranspiled ES6+. He urges library authors to avoid unnecessary transpiling.

Read original articleLink Icon
The State of ES5 on the Web

In a recent analysis, Philip Walton discusses the current state of ES5 on the web, highlighting significant changes since 2017 when he first addressed the deployment of ES6+ code without transpiling to ES5. While many web developers have adopted this approach, JavaScript library authors remain constrained due to the need for compatibility across various deployment environments. The discontinuation of support for IE 11 in 2022 has allowed many businesses to move away from ES5, yet a substantial portion of popular websites still deploy code that is transpiled to ES5, often resulting in unnecessary bloat. Walton emphasizes that while there is nothing inherently wrong with ES5, the practice of transpiling modern code to ES5 can lead to excessive polyfills and larger bundle sizes. His findings reveal that 89% of the top 10,000 websites serve untranspiled ES6+ syntax, indicating a shift in the landscape where supporting legacy browsers is becoming less critical. He recommends that library authors reconsider the need to transpile to ES5, as the majority of sites are already using ES6+ syntax. The article concludes with a call for better configurations in build tools to avoid unnecessary code bloat and improve performance.

- The discontinuation of IE 11 support has shifted the need for ES5 compatibility.

- A significant number of popular websites are serving untranspiled ES6+ syntax.

- Transpiling modern code to ES5 can lead to excessive polyfills and larger bundle sizes.

- Library authors are encouraged to stop transpiling to ES5 as most sites are using ES6+.

- Improved configurations in build tools are necessary to reduce unnecessary code bloat.

Related

Exposition of Front End Build Systems

Exposition of Front End Build Systems

Frontend build systems are crucial in web development, involving transpilation, bundling, and minification steps. Tools like Babel and Webpack optimize code for performance and developer experience. Various bundlers like Webpack, Rollup, Parcel, esbuild, and Turbopack are compared for features and performance.

New Web Development: Or, why Copilots and chatbots are bad for modern web dev

New Web Development: Or, why Copilots and chatbots are bad for modern web dev

The analysis critiques Copilots, chatbots, and React for web development, citing slow sites, complex code, and high costs. It advocates for a shift to browser APIs, CSS, and HTML for better performance and lower expenses. Transition challenges include finding developers skilled in vanilla JavaScript. Organizations are urged to prioritize simplicity, efficiency, and core web technology training.

The Cost of JavaScript

The Cost of JavaScript

JavaScript significantly affects website performance due to download, execution, and parsing costs. Optimizing with strategies like code-splitting, minification, and caching is crucial for faster loading and interactivity, especially on mobile devices. Various techniques enhance JavaScript delivery and page responsiveness.

The Gift of Code

The Gift of Code

The article outlines the evolution of web technologies during Web 2.0, highlighting HTML5's creation, JavaScript's stagnation, Mozilla's rise with Firefox, and the impact of Adobe's Project Tamarin on development.

Going Buildless

Going Buildless

The article explores "buildless" web development, highlighting advancements in HTML, CSS, and JavaScript that simplify workflows. It suggests this approach is ideal for smaller projects, enhancing the developer experience.

Link Icon 1 comments
By @lelandfe - 7 months
Wow, first Walton post in 2 years.

TL;DR ES6 is ubiquitous; library authors should only transpile new features (shipped <30 months) per Web Platform's "Baseline Widely Available"; sites which do need ES5 should bite the bullet and transpile `node_modules` despite the build time