  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.
