Open
Description
I just ran into this issue myself where Firefox was not consuming a preload for fetch because the fetch() call was specifying custom headers. The specification does not mention that headers need to be matched, and Chrome removed preloaded resources by headers.
A simple repro would be:
<link rel="preload" href="test.json" as="fetch" crossorigin="anonymous">
fetch( 'test.json', {
headers: {
Accept: 'application/json', // Firefox disregards this header when consuming a preload
'X-Requested-With': 'XMLHttpRequest', // but not this one
}
} );
Refs:
https://issues.chromium.org/issues/40685467#comment21
https://bugzilla.mozilla.org/show_bug.cgi?id=1854292