You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was working on using fetch to define how source maps are loaded, for #30, and I did some analysis on the current HTTP headers to understand which parameters to pass to fetch.
Firefox devtools:
Headers{accept: "*/*","accept-encoding": "gzip, deflate, br","accept-language": "en-US,en;q=0.7,it;q=0.3","cache-control": "max-age=0",connection: "keep-alive",host: "localhost:4507","user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0"}
Chrome devtools:
Headers{"accept-encoding": "gzip, deflate, br","accept-language": "en-GB,en-US;q=0.9,en;q=0.8",connection: "keep-alive",host: "localhost:4507","sec-fetch-dest": "empty","sec-fetch-mode": "no-cors","sec-fetch-site": "same-origin","user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0."...17morecharacters}
Safari devtools:
Headers{accept: "*/*","accept-encoding": "gzip, deflate","accept-language": "en-GB,en;q=0.9",connection: "keep-alive",host: "localhost:4507",referer: "http://localhost:4507/","sec-fetch-dest": "empty","sec-fetch-mode": "no-cors","sec-fetch-site": "same-origin","user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17."...19morecharacters}
I noticed that both Firefox and Safari use Accept: */*, even if the source map is expected to be a JSON file. We recently introduced a "json" fetch destination (https://fetch.spec.whatwg.org/#dom-requestdestination-json) that would have the following effects:
Accept is application/json,*/*;q=0.5
For browsers that support it, Sec-Fetch-Dest is json
It is currently used by the JSON modules spec import ... with { type: "json" }, but it would fit great for this use case too.
The text was updated successfully, but these errors were encountered:
I was working on using fetch to define how source maps are loaded, for #30, and I did some analysis on the current HTTP headers to understand which parameters to pass to fetch.
Firefox devtools:
Chrome devtools:
Safari devtools:
I noticed that both Firefox and Safari use
Accept: */*
, even if the source map is expected to be a JSON file. We recently introduced a"json"
fetch destination (https://fetch.spec.whatwg.org/#dom-requestdestination-json) that would have the following effects:Accept
isapplication/json,*/*;q=0.5
Sec-Fetch-Dest
isjson
It is currently used by the JSON modules spec
import ... with { type: "json" }
, but it would fit great for this use case too.The text was updated successfully, but these errors were encountered: