skip to main content
10.1145/3366423.3380157acmconferencesArticle/Chapter ViewAbstractPublication PageswwwConference Proceedingsconference-collections
research-article

JSCleaner: De-Cluttering Mobile Webpages Through JavaScript Cleanup

Published:20 April 2020Publication History

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

References

  1. 2019. CITI Program - Collaborative Institutional Training Initiative. www.citiprogram.org. Accessed: 2019-10-10.Google ScholarGoogle Scholar
  2. 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 ScholarGoogle Scholar
  3. 2019. HTTP Archive. https://httparchive.org/. Accessed: 2019-09-10.Google ScholarGoogle Scholar
  4. 2019. Majestic Million - Majestic. https://majestic.com/reports/majestic-million. Accessed: 2019-09-10.Google ScholarGoogle Scholar
  5. 2019. Selenium WebDriver. Browser Automation.https://www.seleniumhq.org/projects/webdriver/. Accessed: 2019-05-14.Google ScholarGoogle Scholar
  6. 2019. WebPageTest - Website Performance and Optimization Test. https://www.webpagetest.org/. Accessed: 2019-09-10.Google ScholarGoogle Scholar
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. maximilianhils cortesi and raumfresser.2019. mitmproxy - an interactive HTTPS proxy. https://mitmproxy.org/. Accessed: 2019-10-13.Google ScholarGoogle Scholar
  10. Yehia Elkhatib, Gareth Tyson, and Michael Welzl. 2014. Can SPDY really make the web faster?. In Networking Conference, 2014 IFIP. IEEE, 1–9.Google ScholarGoogle ScholarCross RefCross Ref
  11. 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 ScholarGoogle Scholar
  12. 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 ScholarGoogle Scholar
  13. 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 ScholarGoogle Scholar
  14. Ecma International. 2019. ECMAScript® 2018 Language Specification. http://www.ecma-international.org/ecma-262/9.0/index.html. Accessed: 2019-05-05.Google ScholarGoogle Scholar
  15. 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 ScholarGoogle Scholar
  16. Mozilla and individual contributors. 2005. Document Object Model (DOM).Google ScholarGoogle Scholar
  17. Mozilla and individual contributors. 2005. The HTML DOM API.Google ScholarGoogle Scholar
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle Scholar
  20. Addy Osmani. 2018. The cost of JavaScript. https://medium.com/@addyosmani/the-cost-of-javascript-in-2018-7d8950fbb5d4. Accessed: 2019-05-05.Google ScholarGoogle Scholar
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle Scholar
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. JSCleaner: De-Cluttering Mobile Webpages Through JavaScript Cleanup
          Index terms have been assigned to the content through auto-classification.

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            WWW '20: Proceedings of The Web Conference 2020
            April 2020
            3143 pages
            ISBN:9781450370233
            DOI:10.1145/3366423

            Copyright © 2020 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 20 April 2020

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article
            • Research
            • Refereed limited

            Acceptance Rates

            Overall Acceptance Rate1,899of8,196submissions,23%

            Upcoming Conference

            WWW '24
            The ACM Web Conference 2024
            May 13 - 17, 2024
            Singapore , Singapore

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader

          HTML Format

          View this article in HTML Format .

          View HTML Format