NEW 226382
Prefetching cross-origin subresources for the current page gives double fetch
https://bugs.webkit.org/show_bug.cgi?id=226382
Summary Prefetching cross-origin subresources for the current page gives double fetch
Jeff Kaufman
Reported 2021-05-28 11:29:02 PDT
When a page makes a cross-origin prefetch it's not used on that page. To reproduce: 1. Turn on Develop > Experimental Features > LinkPrefetch (tested in Version 14.1) 2. Visit https://www.jefftk.com/test/prefetch/prefetch-nested 3. See that bg.css, log.js, and hello-world are immediately fetched 4. After waiting five seconds, see that they are fetched a second time (confirmed with server logs) I tried adding "as=" attributes, without effect: https://www.jefftk.com/test/prefetch/prefetch-nested-as It looks to me like the document is used for prefetching if I navigate to it instead of putting it in an iframe (https://www.jefftk.com/test/prefetch/prefetch-navigate). This one does make some sense: if you prefetch a document you could plausibly either want to navigate the whole page to it, or navigate an iframe. Chrome handles this the same way as Safari, while Firefox does the opposite; I've filed https://github.com/whatwg/html/issues/6723
Attachments
Radar WebKit Bug Importer
Comment 1 2021-06-04 11:29:19 PDT
Note You need to log in before you can comment on or make changes to this bug.