Re: [whatwg/fetch] Accept headers in spec cause confusion (#274)

>  And we have been pushing improved content negotiation solutions in the last few years. @yoavweiss 

I feel a ton better about my thoughts on the matter. Wish I would have seen that years ago.

> Regarding fetch vs.script destinations, do you have a use case in mind where differentiating the two would be helpful? What are the Accept header values for them when not considering preload?

To be clear I have no issue with `fetch` & `script`. IIRC @domenic mentioned a needle in some haystack here about mime types only being needed to discern whether or not to block a script or not. I think related to image vs '*'. As I think more there are a couple tangental thoughts.
1. What is the value of `Accept` which I am much clearer on from this issue and the places you all are linking me to. (wasn't my initial concern but interested now).
2. Can/should the `Accept` be the same as the browser does now. (elaboration below).

Navigating to a url seems to give a consistent `Accept` [Based on this MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation/List_of_default_Accept_values). Would the correct term we use be "Browsing context"? I noticed that somewhere before.

My use case is am currently preloading some html. Due to `as=document` not working (which at the time months ago didn't know this was a personal problem of Chrome's) we began using `<link rel=preload as=fetch>` to circumvent the bug. We do some light logging internally via `Accept` and although technically an html file and javascript file are indeed "text" (as @annevk pointed out to me earlier today).
I do feel if there is a chance we can take to have `as=document` (or `document` destination) be "browsing context" or whatever makes that default `Accept`. I think this is the place to at least start the conversation. I do not know how this affects `XMLHTTPRequest` tho.

P.S. ** note to self ** Use this, that, it, etc. less on Github. * This * (pun intended) is the second time someone mentioned to me. :-)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/274#issuecomment-373450714

Received on Thursday, 15 March 2018 17:04:59 UTC