NEW194589
Inserting <link rel=preload via script results in duplicate downloads
https://bugs.webkit.org/show_bug.cgi?id=194589
Summary Inserting <link rel=preload via script results in duplicate downloads
Andy Davies
Reported 2019-02-13 05:10:48 PST
Created attachment 361912 [details] Console showing resource timing entries https://andydavies.github.io/test-rel-preload/tests/electro/index-js-inserted-link-preload-v2.html has a script block that injects <link rel=preload elements for four fonts When the page is loaded in Safari, frequently (but not always) each script is downloaded twice - see the attached Inspector screenshot The double downloads don't appear in the Resource Timing entries for the page, with there only being one entry per font Viewing the server logs (with the same page on a different server) shows the fonts were downloaded twice
Attachments
Console showing resource timing entries (1.34 MB, image/png)
2019-02-13 05:10 PST, Andy Davies
no flags
Safari Waterfall showing double downloads (1006.42 KB, image/png)
2019-02-13 05:11 PST, Andy Davies
no flags
Server log confirming duplicate requests (19.31 KB, text/plain)
2019-02-13 05:12 PST, Andy Davies
no flags
Andy Davies
Comment 1 2019-02-13 05:11:36 PST
Created attachment 361913 [details] Safari Waterfall showing double downloads
Andy Davies
Comment 2 2019-02-13 05:12:16 PST
Created attachment 361914 [details] Server log confirming duplicate requests
Radar WebKit Bug Importer
Comment 3 2019-02-14 11:17:02 PST
gaurav5430
Comment 4 2021-09-20 19:28:59 PDT
I am facing a similar issue where preloaded fonts are being downloaded twice. In my case though, it is once downloaded from preload and then downloaded from css font face. As for not showing up in resource timing, I do face a similar issue where the css font face download is only shown for the first time and once cached, does not appear in the font network tab anymore in subsequent requests I also get the "not used within 3 seconds" message
Note You need to log in before you can comment on or make changes to this bug.