# Third-party scripts and privacy

DevFeed: [Third-party scripts and privacy](<https://devfeed.tech/articles/third-party-scripts-and-privacy-89154.md>)

Original publisher: [Read original article](<https://specification.website/spec/privacy/third-party-scripts/>)

Author: Joost de Valk

Published: 2026-07-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [The Website Specification](<https://devfeed.tech/sources/the-website-specification.md>)

Topics: [frontend security](<https://devfeed.tech/topics/frontend-security.md>), [Security, Privacy and Abuse Prevention](<https://devfeed.tech/topics/security-privacy-and-abuse-prevention.md>), [Security](<https://devfeed.tech/topics/security.md>), [Self-hosted](<https://devfeed.tech/topics/self-hosted.md>)

Tags: [attacks](<https://devfeed.tech/tags/attacks.md>), [auditing](<https://devfeed.tech/tags/auditing.md>), [browser](<https://devfeed.tech/tags/browser.md>), [csp](<https://devfeed.tech/tags/csp.md>), [data](<https://devfeed.tech/tags/data.md>), [data-leaks](<https://devfeed.tech/tags/data-leaks.md>), [hosting](<https://devfeed.tech/tags/hosting.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [privacy](<https://devfeed.tech/tags/privacy.md>), [recommended](<https://devfeed.tech/tags/recommended.md>)

## AI overview

The article explains how third-party scripts can access page data and expose visitor information to external domains. It recommends auditing and justifying each script, self-hosting where practical, delaying or gating nonessential scripts, and using security controls such as Content Security Policy, Subresource Integrity, and Referrer-Policy.

## Source excerpt

Every script loaded from another domain can read cookies, see the URL, and exfiltrate data from your page. Audit them, justify them, and lock them down.