JSRehab: Weaning Common Web Interface Components from JavaScript Addiction

Leveraging JavaScript (JS) for User Interface (UI) interactivity has been the norm on the web for many years. Yet, using JS increases bandwidth and battery consumption as scripts need to be downloaded and processed by the browser. Plus, client-side JS may expose visitors to security vulnerabilities such as Cross-Site Scripting (XSS). This paper introduces a new server-side plugin, called JSRehab, that automatically rewrites common web interface components by alternatives that do not require any JavaScript (JS). The main objective of JSRehab is to drastically reduce—and ultimately remove—the inclusion of JS in a web page to improve its responsiveness and consume less resources. We report on our implementation of JSRehab for Bootstrap, the most popular UI framework by far, and evaluate it on a corpus of 100 webpages. We show through manual validation that it is indeed possible to lower the dependencies of pages on JS while keeping intact its interactivity and accessibility. We observe that JSRehab brings energy savings of at least 5 % for the majority of web pages on the tested devices, while introducing a median on-the-wire overhead of only 5 % to the HTML payload.

Paper

References (24)

05Web Accessibility Laws & Policies2021
06Accessible Rich Internet Applications (WAI-ARIA) 1.3 — WAI-ARIA States and Properties2021 · W3C
07Express - Node.2021 · expressjs
08Q-Success2021 · W3Techs — Usage statistics of client-side programming
09W3Techs -Usage statistics of client-side programming languages for websites2021
10Mozilla Hacks — Introducing State Partitioning2021
11The Web We Want — I want a CSS pseudo-selector for elements that are in the viewport2021 · webwewant.fyi/wants/63
12Bootstrap 4 — Collapse2021 · Accordion example

Scroll for more · 12 remaining

Similar papers

© 2026 NYSGPT2525 LLC