Modern websites heavily rely on JavaScript (JS) to implement legitimate functionality as well as privacy-invasive advertising and tracking. Browser extensions such as NoScript block any script not loaded by a trusted list of endpoints, thus hoping to block privacy-invasive scripts while avoiding breaking legitimate website functionality. In this paper, we investigate whether blocking JS on the web is feasible without breaking legitimate functionality. To this end, we conduct a large-scale measurement study of JS blocking on 100K websites. We evaluate the effectiveness of different JS blocking strategies in tracking prevention and functionality breakage. Our evaluation relies on quantitative analysis of network requests and resource loads as well as manual qualitative analysis of visual breakage. First, we show that while blocking all scripts is quite effective at reducing tracking, it significantly degrades functionality on approximately two-thirds of the tested websites. Second, we show that selective blocking of a subset of scripts based on a curated list achieves a better tradeoff. However, there remain approximately 15% `mixed` scripts, which essentially merge tracking and legitimate functionality and thus cannot be blocked without causing website breakage. Finally, we show that fine-grained blocking of a subset of JS methods, instead of scripts, reduces major breakage by 3.8$\times$ while providing the same level of tracking prevention. Our work highlights the promise and open challenges in fine-grained JS blocking for tracking prevention without breaking the web.
翻译:现代网站严重依赖JavaScript(JS)来实现合法功能以及侵犯隐私的广告和跟踪。浏览器扩展程序(如NoScript)阻止未由受信任的端点加载的任何脚本,从而希望阻止侵犯隐私的脚本,同时避免破坏合法网站功能。在本文中,我们探讨在不破坏合法功能的情况下阻止Web上的JS的可行性。为此,我们对10万个网站进行了大规模的JS阻止测量研究。我们评估了不同的JS阻止策略在追踪预防和功能破坏方面的有效性。我们的评估依靠网络请求和资源加载的定量分析以及视觉破坏的手动定性分析。首先,我们表明,虽然阻止所有脚本在降低跟踪方面相当有效,但它会显着降低约三分之二被测试网站的功能。其次,我们表明,基于策划清单的选择性阻止脚本的子集可以实现更好的权衡。然而,仍然有大约15%的“混合”脚本,它们基本上合并了跟踪和合法功能,因此无法在不导致网站破坏的情况下被阻止。最后,我们表明,与阻止所有脚本相比,对JS方法的子集进行精细阻止可以将主要破坏降低3.8倍,同时提供相同水平的跟踪预防。我们的工作凸显了精细阻止JS在追踪预防而不破坏网络方面的前景和挑战。