ABSTRACT
A significant fraction of the World Wide Web suffers from the excessive usage of JavaScript (JS). Based on an analysis of popular webpages, we observed that a considerable number of JS elements utilized by these pages are not essential for their visual and functional features. In this paper, we propose JSCleaner, a JavaScript de-cluttering engine that aims at simplifying webpages without compromising their content or functionality. JSCleaner relies on a rule-based classification algorithm that classifies JS into three main categories: non-critical, replaceable, and critical. JSCleaner removes non-critical JS from a webpage, translates replaceable JS elements with their HTML outcomes, and preserves critical JS. Our quantitative evaluation of 500 popular webpages shows that JSCleaner achieves around 30% reduction in page load times coupled with a 50% reduction in the number of requests and the page size. In addition, our qualitative user study of 103 evaluators shows that JSCleaner preserves 95% of the page content similarity, while maintaining nearly 88% of the page functionality (the remaining 12% did not have a major impact on the user browsing experience).
- 2019. CITI Program - Collaborative Institutional Training Initiative. www.citiprogram.org. Accessed: 2019-10-10.Google Scholar
- 2019. How we built Facebook Lite for every Android phone and network. https://code.fb.com/android/how-we-built-facebook-lite-for-every-android-phone-and-network/. Accessed: 2019-06-25.Google Scholar
- 2019. HTTP Archive. https://httparchive.org/. Accessed: 2019-09-10.Google Scholar
- 2019. Majestic Million - Majestic. https://majestic.com/reports/majestic-million. Accessed: 2019-09-10.Google Scholar
- 2019. Selenium WebDriver. Browser Automation.https://www.seleniumhq.org/projects/webdriver/. Accessed: 2019-05-14.Google Scholar
- 2019. WebPageTest - Website Performance and Optimization Test. https://www.webpagetest.org/. Accessed: 2019-09-10.Google Scholar
- Michael Butkiewicz, Harsha V. Madhyastha, and Vyas Sekar. 2011. Understanding Website Complexity: Measurements, Metrics, and Implications. In Proceedings of the 2011 ACM SIGCOMM Conference on Internet Measurement Conference (Berlin, Germany) (IMC ’11). ACM, New York, NY, USA, 313–328. https://doi.org/10.1145/2068816.2068846Google ScholarDigital Library
- Arthur Charguéraud, Alan Schmitt, and Thomas Wood. 2018. JSExplain: A Double Debugger for JavaScript. In Companion Proceedings of the The Web Conference 2018. International World Wide Web Conferences Steering Committee, 691–699.Google ScholarDigital Library
- maximilianhils cortesi and raumfresser.2019. mitmproxy - an interactive HTTPS proxy. https://mitmproxy.org/. Accessed: 2019-10-13.Google Scholar
- Yehia Elkhatib, Gareth Tyson, and Michael Welzl. 2014. Can SPDY really make the web faster?. In Networking Conference, 2014 IFIP. IEEE, 1–9.Google ScholarCross Ref
- Mohammad Ghasemisharif, Peter Snyder, Andrius Aucinas, and Benjamin Livshits. 2018. SpeedReader: Reader Mode Made Fast and Private. CoRR abs/1811.03661(2018). arxiv:1811.03661http://arxiv.org/abs/1811.03661Google Scholar
- Google. 2017. Find Out How You Stack Up to New Industry Benchmarks for Mobile Page Speed. https://think.storage.googleapis.com/docs/mobile-page-speed-new-industry-benchmarks.pdf. Accessed: 2019-05-11.Google Scholar
- Google. 2019. AMP is a web component framework to easily create user-first web experiences - amp.dev. https://amp.dev. Accessed: 2019-05-05.Google Scholar
- Ecma International. 2019. ECMAScript® 2018 Language Specification. http://www.ecma-international.org/ecma-262/9.0/index.html. Accessed: 2019-05-05.Google Scholar
- Sergio Maffeis, John C. Mitchell, and Ankur Taly. 2008. An Operational Semantics for JavaScript. In Programming Languages and Systems, G. Ramalingam (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 307–325.Google Scholar
- Mozilla and individual contributors. 2005. Document Object Model (DOM).Google Scholar
- Mozilla and individual contributors. 2005. The HTML DOM API.Google Scholar
- Ravi Netravali, Ameesh Goyal, James Mickens, and Hari Balakrishnan. 2016. Polaris: Faster Page Loads Using Fine-grained Dependency Tracking. In 13th USENIX Symposium on Networked Systems Design and Implementation (NSDI 16). USENIX Association, Santa Clara, CA. https://www.usenix.org/conference/nsdi16/technical-sessions/presentation/netravaliGoogle ScholarDigital Library
- Ravi Netravali, Vikram Nathan, James Mickens, and Hari Balakrishnan. 2018. Vesper: Measuring Time-to-Interactivity for Web Pages. In 15th USENIX Symposium on Networked Systems Design and Implementation (NSDI 18). USENIX Association, Renton, WA, 217–231. https://www.usenix.org/conference/nsdi18/presentation/netravali-vesperGoogle Scholar
- Addy Osmani. 2018. The cost of JavaScript. https://medium.com/@addyosmani/the-cost-of-javascript-in-2018-7d8950fbb5d4. Accessed: 2019-05-05.Google Scholar
- Daejun Park, Andrei Stefănescu, and Grigore Roşu. 2015. KJS: A Complete Formal Semantics of JavaScript. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (Portland, OR, USA) (PLDI ’15). ACM, New York, NY, USA, 346–356. https://doi.org/10.1145/2737924.2737991Google ScholarDigital Library
- Marija Selakovic and Michael Pradel. 2016. Performance Issues and Optimizations in JavaScript: An Empirical Study. In Proceedings of the 38th International Conference on Software Engineering (Austin, Texas) (ICSE ’16). ACM, New York, NY, USA, 61–72. https://doi.org/10.1145/2884781.2884829Google ScholarDigital Library
- Srikanth Sundaresan, Nick Feamster, Renata Teixeira, and Nazanin Magharei. 2013. Community Contribution Award – Measuring and Mitigating Web Performance Bottlenecks in Broadband Access Networks. In Proceedings of the 2013 Conference on Internet Measurement Conference (Barcelona, Spain) (IMC ’13). ACM, New York, NY, USA, 213–226. https://doi.org/10.1145/2504730.2504741Google ScholarDigital Library
- Xiao Sophia Wang, Aruna Balasubramanian, Arvind Krishnamurthy, and David Wetherall. 2013. Demystifying Page Load Performance with WProf. In Presented as part of the 10th USENIX Symposium on Networked Systems Design and Implementation (NSDI 13). USENIX, Lombard, IL, 473–485. https://www.usenix.org/conference/nsdi13/technical-sessions/presentation/wang_xiaoGoogle ScholarDigital Library
- Xiao Sophia Wang, Arvind Krishnamurthy, and David Wetherall. 2016. Speeding up Web Page Loads with Shandian. In 13th USENIX Symposium on Networked Systems Design and Implementation (NSDI 16). USENIX Association, Santa Clara, CA, 109–122. https://www.usenix.org/conference/nsdi16/technical-sessions/presentation/wangGoogle ScholarDigital Library
- Jihwan Yeo, Changhyun Shin, and Soo-Mook Moon. 2019. Snapshot-based Loading Acceleration of Web Apps with Nondeterministic JavaScript Execution. In The World Wide Web Conference. ACM, 2215–2224.Google Scholar
- Yasir Zaki, Jay Chen, Thomas Pötsch, Talal Ahmad, and Lakshminarayanan Subramanian. 2014. Dissecting Web Latency in Ghana. In Proc. of the ACM Internet Measurement Conference (IMC). Vancouver, BC, Canada.Google ScholarDigital Library
Index Terms
- JSCleaner: De-Cluttering Mobile Webpages Through JavaScript Cleanup
Recommendations
Muzeel: assessing the impact of JavaScript dead code elimination on mobile web performance
IMC '22: Proceedings of the 22nd ACM Internet Measurement ConferenceTo quickly create interactive web pages, developers heavily rely on (large) general-purpose JavaScript libraries. This practice bloats web pages with complex unused functions dead code which are unnecessarily downloaded and processed by the browser. The ...
An Analysis of URLs Generated from JavaScript Code
ICIS '12: Proceedings of the 2012 IEEE/ACIS 11th International Conference on Computer and Information ScienceSearch engines use a crawling system to recursively download web pages, analyze HTML pages, and generate a new list of URLs to crawl. As web pages are becoming more dynamic than before, JavaScript is heavily used, which poses a great challenge for the ...
Comments