Firefox downloads preloads with unsupported type
Categories
(Core :: Networking, defect)
Tracking
()
People
(Reporter: barry, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Steps to reproduce:
Load https://www.tunetheweb.com/experiments/preload-unknown-type/
which is a test page that contains this code:
<link rel="preload" href="photo.unknown" type="not-a-mimetype" as="image">
Actual results:
The photo.unknown file is loaded, as shown in the Network tab of devtools
Expected results:
The photo.unknown file should NOT be downloaded as Firefox does not support the mimetype.
It does log this in the console:
Preload of https://www.tunetheweb.com/experiments/preload-unknown-type/photo.unknown was ignored due to unknown “as” or “type” values, or non-matching “media” attribute. preload-unknown-type
GET
https://www.tunetheweb.com/experiments/preload-unknown-type/photo.unknown
[HTTP/2 404 198ms]
The resource at “https://www.tunetheweb.com/experiments/preload-unknown-type/photo.unknown” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly.
Suggesting it knows it shouldn't download it, but then it loads it anyway!
Neither Chrome nor Safari download the file. Which is the correct behaviour.
Weirdly there is a WPT for this as part of https://wpt.live/preload/preload-type-match.html and Firefox passes this (both on wpy.live and wpt.fyi) but my test case fails. I'm not sure why?
Comment 1•16 hours ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Description
•