arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.06955cs.CR
收藏

JSRehab:从JavaScript成瘾中摆脱公共Web界面组件

JSRehab: Weaning Common Web Interface Components from JavaScript Addiction

Romain Fouquet, Pierre Laperdrix, Romain Rouvoy

摘要:

利用JavaScript(JS)实现用户界面(UI)交互性已经成为网络上的标准多年。然而,使用JS会增加带宽和电池消耗,因为脚本需要由浏览器下载和处理。此外,客户端JS可能会暴露访问者的安全漏洞,如跨站点脚本(XSS)。本文介绍了一种新的服务器端插件,称为JSRehab,自动重写常见的Web界面组件的替代品,不需要任何JavaScript(JS)。JSRehab的主要目标是大幅减少并最终删除网页中包含的JS,以提高其响应能力并消耗更少的资源。我们报告我们的实现JS康复Bootstrap,到目前为止最流行的UI框架,并评估它的语料库的100个网页。我们通过手动验证表明,确实可以降低页面对JS的依赖性,同时保持其交互性和可访问性。我们观察到,JSRehab为测试设备上的大多数网页带来了至少5%的节能,同时为HTML有效负载引入了仅5%的中间在线开销。

英文摘要:

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 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑