-
JSAnalyzer: A Web Developer Tool for Simplifying Mobile Pages Through JavaScript Optimizations
Authors:
Moumena Chaqfeh,
Jacinta Hu,
Waleed Hashmi,
Russell Coke,
Lakshmi Subramanian,
Yasir Zaki
Abstract:
The amount of JavaScript embedded in Web pages has substantially grown in the past decade, leading to large and complex pages that are computationally intensive for mobile devices. In this paper, we propose JSAnalyzer, an easy-to-use tool that enables Web developers to quickly optimize and generate simpler versions of existing web pages for mobile users. JSAnalyzer can selectively enable or disabl…
▽ More
The amount of JavaScript embedded in Web pages has substantially grown in the past decade, leading to large and complex pages that are computationally intensive for mobile devices. In this paper, we propose JSAnalyzer, an easy-to-use tool that enables Web developers to quickly optimize and generate simpler versions of existing web pages for mobile users. JSAnalyzer can selectively enable or disable JavaScript elements in a page while visually observing their impact, such that non-critical elements can be removed without sacrificing the visual content or the interactive functionality. Our quantitative evaluation results show that JSAnalyzer achieves more than 88% relative increase in performance scoring for low-end mobile phones (i.e., from 32% to 60%), and reduces the page load time by 30%. A qualitative study of 22 users shows that JSAnalyzer maintains more than 90% visual similarity to the original pages, whereas a developer evaluation study conducted with 23 developers shows that JSAnalyzer scores more than 80% in terms of usefulness and usability while retaining the page content and functional features. Additionally, we show that JSAnalyzer outperforms state-of-the-art solutions such as JSCleaner and Google AMP.
△ Less
Submitted 26 June, 2021;
originally announced June 2021.
-
To Block or Not to Block: Accelerating Mobile Web Pages On-The-Fly Through JavaScript Classification
Authors:
Moumena Chaqfeh,
Muhammad Haseeb,
Waleed Hashmi,
Patrick Inshuti,
Manesha Ramesh,
Matteo Varvello,
Fareed Zaffar,
Lakshmi Subramanian,
Yasir Zaki
Abstract:
The increasing complexity of JavaScript in modern mobile web pages has become a critical performance bottleneck for low-end mobile phone users, especially in develo** regions. In this paper, we propose SlimWeb, a novel approach that automatically derives lightweight versions of mobile web pages on-the-fly by eliminating the use of unnecessary JavaScript. SlimWeb consists of a JavaScript classifi…
▽ More
The increasing complexity of JavaScript in modern mobile web pages has become a critical performance bottleneck for low-end mobile phone users, especially in develo** regions. In this paper, we propose SlimWeb, a novel approach that automatically derives lightweight versions of mobile web pages on-the-fly by eliminating the use of unnecessary JavaScript. SlimWeb consists of a JavaScript classification service powered by a supervised Machine Learning (ML) model that provides insights into each JavaScript element embedded in a web page. SlimWeb aims to improve the web browsing experience by predicting the class of each element, such that essential elements are preserved and non-essential elements are blocked by the browsers using the service. We motivate the core design of SlimWeb using a user preference survey of 306 users and perform a detailed evaluation of SlimWeb across 500 popular web pages in a develo** region on real 3G and 4G cellular networks, along with a user experience study with 20 real-world users and a usage willingness survey of 588 users. Evaluation results show that SlimWeb achieves a 50% reduction in the page load time compared to the original pages, and more than 30% reduction compared to competing solutions, while achieving high similarity scores to the original pages measured via a qualitative evaluation study of 62 users. SlimWeb improves the overall user experience by more than 60% compared to the original pages, while maintaining 90%-100% of the visual and functional components of most pages. Finally, the SlimWeb classifier achieves a median accuracy of 90% in predicting the JavaScript category.
△ Less
Submitted 20 June, 2021;
originally announced June 2021.
-
Muzeel: A Dynamic JavaScript Analyzer for Dead Code Elimination in Today's Web
Authors:
Tofunmi Kupoluyi,
Moumena Chaqfeh,
Matteo Varvello,
Waleed Hashmi,
Lakshmi Subramanian,
Yasir Zaki
Abstract:
JavaScript contributes to the increasing complexity of today's web. To support user interactivity and accelerate the development cycle, web developers heavily rely on large general-purpose third-party JavaScript libraries. This practice increases the size and the processing complexity of a web page by bringing additional functions that are not used by the page but unnecessarily downloaded and proc…
▽ More
JavaScript contributes to the increasing complexity of today's web. To support user interactivity and accelerate the development cycle, web developers heavily rely on large general-purpose third-party JavaScript libraries. This practice increases the size and the processing complexity of a web page by bringing additional functions that are not used by the page but unnecessarily downloaded and processed by the browser. In this paper, an analysis of around 40,000 web pages shows that 70% of JavaScript functions on the median page are unused, and the elimination of these functions would contribute to the reduction of the page size by 60%. Motivated by these findings, we propose Muzeel (which means eliminator in Arabic); a solution for eliminating JavaScript functions that are not used in a given web page (commonly referred to as dead code). Muzeel extracts all of the page event listeners upon page load, and emulates user interactions using a bot that triggers each of these events, in order to eliminate the dead code of functions that are not called by any of these events. Our evaluation results spanning several Android mobile phones and browsers show that Muzeel speeds up the page load by around 30% on low-end phones, and by 25% on high-end phones under 3G network. It also reduces the speed index (which is an important user experience metric) by 23% and 21% under the same network on low-end, and high-end phones, respectively. Additionally, Muzeel reduces the overall download size while maintaining the visual content and interactive functionality of the pages.
△ Less
Submitted 15 June, 2021;
originally announced June 2021.