Same Script, Different Behavior: Characterizing Divergent JavaScript Execution Across Different Device Platforms
Ahsan Zafar, Junhua Su, Sohom Datta, Alexandros Kapravelos, Anupam Das
Abstract
JavaScript drives dynamic content across modern web platforms, yet differences in browser engines, hardware, and APIs create distinct execution environments on mobile and desktop devices. This divergence raises important concerns about platform-specific tracking, but its scope and impact remain underexplored. In this paper, we present a hybrid analysis of JavaScript execution across mobile and desktop to uncover behavioral differences in how identical code operates. By combining static analysis of script structure with dynamic tracing of runtime behavior, we identify execution path divergences tied to the user's device. Our study shows that 20.6% of scripts on the top 10K Tranco-ranked websites exhibit platformspecific execution. Our tracing algorithm pinpoints the sources of divergence for 92.8% of conditional Web API calls, with 76% involving known fingerprinting APIs and 6% relying on lesser-known but platform-revealing interfaces. We further categorize divergent paths, finding asymmetric tracking patterns: desktop flows are dominated by fingerprinting and bot detection, while mobile flows focus more on behavioral profiling.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
Lineage
- Online Tracking: A 1-million-site Measurement and Analysis cites Internet Jones and the Raiders of the Lost Trackers: An Archaeological Study of Web Tracking from 1996 to 2016
- Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting Behaviors cites Online Tracking: A 1-million-site Measurement and Analysis
- Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting Behaviors cites (Cross-)Browser Fingerprinting via OS and Hardware Level Features
- (Cross-)Browser Fingerprinting via OS and Hardware Level Features cites Online Tracking: A 1-million-site Measurement and Analysis
- (Cross-)Browser Fingerprinting via OS and Hardware Level Features cites Internet Jones and the Raiders of the Lost Trackers: An Archaeological Study of Web Tracking from 1996 to 2016
- Tranco: A Research-Oriented Top Sites Ranking Hardened Against Manipulation cites Online Tracking: A 1-million-site Measurement and Analysis
Builds on14
- Tranco: A Research-Oriented Top Sites Ranking Hardened Against ManipulationVictor Le Pochat, Tom van Goethem, Samaneh Tajalizadehkhoob, Maciej Korczynski et al.NDSS 2019 · 826 citations
- Online Tracking: A 1-million-site Measurement and AnalysisSteven Englehardt, Arvind NarayananCCS 2016 · 798 citations
- Internet Jones and the Raiders of the Lost Trackers: An Archaeological Study of Web Tracking from 1996 to 2016Ada Lerner, Anna Kornfeld Simpson, Tadayoshi Kohno, Franziska RoesnerUSENIX Security 2016 · 273 citations
- (Cross-)Browser Fingerprinting via OS and Hardware Level FeaturesYinzhi Cao, Song Li, Erik WijmansNDSS 2017 · 199 citations
- Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting BehaviorsUmar Iqbal, Steven Englehardt, Zubair ShafiqS&P 2021 · 143 citations
Related papers
- Cross-Boundary Mobile Tracking: Exploring Java-to-JavaScript Information Diffusion in WebViewsSohom Datta, Michalis Diamantaris, Ahsan Zafar, Junhua Su et al.NDSS 2026 · 2 citations
- Automatic Discovery of Emerging Browser Fingerprinting TechniquesJunhua Su, Alexandros KapravelosWWW 2023 · 17 citations
- The Web's Sixth Sense: A Study of Scripts Accessing Smartphone SensorsAnupam Das, Gunes Acar, Nikita Borisov, Amogh PradeepCCS 2018 · 91 citations
- PanoptiChrome: A Modern In-browser Taint Analysis FrameworkRahul Kanyal, Smruti R. SarangiWWW 2024 · 5 citations
- Towards Realistic and ReproducibleWeb Crawl MeasurementsJordan Jueckstock, Shaown Sarker, Peter Snyder, Aidan Beggs et al.WWW 2021 · 52 citations
