Getting preload unused warning even though it appears the preloaded resource was used successfully
Reported by
da...@wix.com,
Feb 11 2018
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Steps to reproduce the problem: 1. Open Dev Tools 2. Load site: https://www.coolnotcold.com.au/ 3. Check console tab What is the expected behavior? No warning when preloading works as expected What went wrong? JSON resource is preload using <link> preload as "fetch" It is then actually loaded using XMLHttpRequest From Network tab it appears that prefetching worked as expected, i.e. loaded from cache However, warning still appears in console Did this work before? N/A Chrome version: 64.0.3282.140 Channel: stable OS Version: 10.0 Flash Version:
,
Feb 12 2018
Able to reproduce this issue on reported version 64.0.3282.140, on latest beta 65.0.3352.51, on latest canary 66.0.3344.0 using Mac 10.13.3, windows 10 and Ubuntu 14.04 with steps given in comment#0. i.e; The resource https://static.wixstatic.com/sites/3c31ea_946b918eba6967e48e3ab4ad3c372779_56.json.z?v=3 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it Please make sure it has an appropriate `as` value and it is preloaded intentionally, error is seen in console. Good Build: 61.0.3119.0 Bad Build: 61.0.3121.0 CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/37003a1722d89acc689cd3911efceb583bad43e0..1f18863cc9b2a5fe463671f3eb60de2f95bbf283 Suspecting same form changelog. @ yoav: Please confirm the bug and help in re-assigning if it is not related to your change. Thanks!
,
Feb 13 2018
Here are the preload instructions (you can also see them if you do a "view source"): <link rel="preload" as="fetch" href="https://static.wixstatic.com/sites/3c31ea_711cb4047ffc570d46fe80080bd88bea_58.json.z?v=3"/> <link rel="preload" as="fetch" href="https://static.wixstatic.com/sites/3c31ea_946b918eba6967e48e3ab4ad3c372779_56.json.z?v=3"/> These resources are then loaded using XMLHttpRequest, and the prefetching is providing the expected benefit. Also, the page also uses "preload" with as="script" and the works properly without any console warnings.
,
Feb 27 2018
This is unrelated to above mentioned change and is not a regression. Looking at the example page, I do see these resources being double downloaded and not being properly reused. Digging further, it seems like their credentials modes are off. XHR by default fetches resources with a "same-origin" credentials mode (unless the `withCredentials` attribute is set). So when preloading such resources, you should set the `crossorigin` attribute on them, to make sure the preloaded request matches the "real" one's credentials mode. So, WontFixing since WAI. |
|||
►
Sign in to add a comment |
|||
Comment 1 by krajshree@chromium.org
, Feb 11 2018