Skip to content

Directive: prefetch src

Ryan Parman edited this page Jun 14, 2024 · 8 revisions

Overview

Caution

Obsolete: The prefetch-src directive existed in an earlier draft of the CSP Level 3 (Draft) specification, but was removed.

The prefetch-src directive was meant to restrict link rel=prefetch and link rel=prerender before it was removed from the spec — the latter of which has been removed from the HTML specification. In its place, see the Speculation Rules API.

Affects: <link rel=prefetch> and <link rel=prerender>

Required reading:

Fallbacks

prefetch-src will fallback to default-src if it is undefined.

Possible errors

  • CSP-0803 — [ERROR] directive %s was experimental in CSP3, but should now be removed from CSP policies

References

Clone this wiki locally