WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
268370
<link rel=preload> doesn't work for fetch()'d resources
https://bugs.webkit.org/show_bug.cgi?id=268370
Summary
<link rel=preload> doesn't work for fetch()'d resources
Boris
Reported
2024-01-30 02:46:36 PST
Created
attachment 469615
[details]
a screenshot of the Network dev tools tab showing that other-file.txt is loaded twice I created these 3 files: index.html <!DOCTYPE html> <html lang="en"> <head> <link rel="preload" href="/other-file.txt" type="text/plain" as="fetch" crossorigin=""> <title>test fetch preload</title> </head> <body> <script src="/main.js"></script> </body> </html> main.js fetch('/other-file.txt') other-file.txt hello world Then I served them with `python -m http.server` and opened localhost:8000 in Safari 17. What I expected: main.js and other-file.txt would be loaded at the same time Actual: main.js and other-file.txt are indeed loaded at the exact same time, but then other-file.txt is loaded a second time after main.js and a few seconds later the console prints a warning that "The resource
http://localhost:8000/other-file.txt
was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it wasn't preloaded for nothing." This works correctly (as I expect) on both Chrome and Firefox.
Attachments
a screenshot of the Network dev tools tab showing that other-file.txt is loaded twice
(84.18 KB, image/png)
2024-01-30 02:46 PST
,
Boris
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-02-06 02:47:14 PST
<
rdar://problem/122376527
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug