preload as fetch loads resources twice
Reported by
nathan.m...@gmail.com,
Jun 6 2018
|
|||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36
Steps to reproduce the problem:
1. Add a `<link rel="preload" as="fetch" href="some.json" />`
2. Attempt to `fetch("some.json")`
What is the expected behavior?
The resource should be loaded once
What went wrong?
The resource was loaded twice
Did this work before? No
Does this work in other browsers? N/A
Chrome version: 66.0.3359.181 Channel: stable
OS Version: OS X 10.13.3
Flash Version:
I believe it is related to this issue (https://bugs.chromium.org/p/chromium/issues/detail?id=652228) which seems to be fixed, however as you can see - the resource is loaded twice.
Simple example here: http://nathanmahdavi.com/double-fetch
,
Jun 7 2018
,
Jun 7 2018
crossorigin attribute is missing.
,
Jun 7 2018
Even when defining crossorigin it still will fetch the resource. Chrome believes they are different types. http://nathanmahdavi.com/double-fetch/cors-annon.html http://nathanmahdavi.com/double-fetch/cors-auth.html
,
Jun 7 2018
Please specify {credentials: "same-origin"} for crossorigin="anonymous".
,
Jun 11 2018
That did work. I researched quite a lot regarding this and didn't find any information on needing a cross origin policy. Thank you for pointing me in the right direction. |
|||
►
Sign in to add a comment |
|||
Comment 1 by dtapu...@chromium.org
, Jun 6 2018