← Back to release summary

Add referrerpolicy support to <script> elements

Category
DOM
Type
New or changed feature
Status
Enabled by default (Chrome 70)
Intent stage
None

Summary

Many resource-fetching elements have support for the `referrerpolicy` attribute, which lets developers provide a keyword to influence the value of the `Referer` HTTP header that accompanies a request. The <link> element has support for this, so it is technically possible to preload a script with a developer-set referrer policy even though the <script> element does not have support for this attribute. This feature adds `referrerpolicy` support to the <script> element.

Standards & signals

Docs: https://github.com/w3c/webappsec-referrer-policy/issues/96

Samples: https://script-referrerpolicy.glitch.me/

View on chromestatus.com