← Back to release summary

Modulepreload Referrer Header Fix

Category
Miscellaneous
Type
Chromium catches up
Status
Proposed (Chrome Proposed)
Intent stage
None

WPT details: Covered by Web Platform Tests: * modulepreload-cross-origin-referrerpolicy.sub.html * modulepreload-inline-referrerpolicy.html * modulepreload-referrer-check.html * modulepreload-referrerpolicy.html These tests verify that modulepreload requests include the correct referrer and respect referrer policies. They already pass in Safari/Firefox, and now pass in Chromium after this change.

Summary

Modulepreload and dynamic imports now correctly send the page’s referrer header when fetching scripts, aligning Chrome with the HTML specification.

Motivation

This change adds the referrer header to modulepreload requests in Chrome, fixing an inconsistency where these requests weren't sending referrer information (unlike other script loading methods like <script> tags and dynamic imports). This: 1) Aligns with the HTML spec, which requires using the client's referrer for module fetches 2) Ensures servers relying on referrer data for security or analytics receive consistent information 3) Improves cross-browser compatibility and matches web developer expectations

Standards & signals

Ecosystem

View on chromestatus.com