Re: [fetch] Mechanism to indicate "destination context" (#64)

> The reasoning does not consider the influence of service workers. E.g. you can prefetch something and end up with a synthetic response in the "prefetch cache". That matters.

Yes.. but I'm not sure what you're trying to point out here? 

> You first suggest using type as MIME type but then the processing steps use simple strings such as "image", "xhtml", etc.

Poor wording on my part. In my head I was thinking of the matching algorithm as: `supplied_mime_type.match(expression)`, where expression is, for example, "image".

> It seems simple strings would be more friendly than MIME types still. Making them diverge from context might be okay, though e.g. for "next page" I'm not sure why you'd want "text/html" over "hyperlink". Having the next page change in MIME type over time (e.g. from HTML to an image) should not really impact the desire to prefetch it, I think.

Not sure I follow. If the prefetch target changes from HTML to image, then we definitely want to indicate that via type, such that the UA can set the right request headers.. which are different for HTML and images.


---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/64#issuecomment-115745798

Received on Friday, 26 June 2015 16:24:11 UTC