JSRehab: Weaning Common Web Interface Components from JavaScript Addiction
Romain Fouquet (SPIRALS), Pierre Laperdrix (CNRS, SPIRALS), Romain, Rouvoy (SPIRALS)

TL;DR
This paper presents JSRehab, a server-side plugin that automatically rewrites common web interface components to eliminate JavaScript, reducing resource consumption and improving responsiveness without sacrificing interactivity.
Contribution
It introduces JSRehab, a novel server-side tool that removes JavaScript dependencies from web pages, demonstrated on Bootstrap, with positive effects on energy use and resource efficiency.
Findings
At least 5% energy savings on most tested devices.
Median 5% increase in HTML payload size.
Maintains interactivity and accessibility after JS removal.
Abstract
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 JS-Rehab 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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
