Re: [fetch] Introduce convenience property for request's context (#93)

Yeah, @annevk's use-cases are right. More specifically:

* User navigates to an image. No matching cache entry, network fails. I want to serve my "Ooops, not available offline" page
* Page loads same image as an image. No matching cache entry, network fails. I want to serve a placeholder image.

Also if [preload can set context](https://w3c.github.io/preload/#dfn-as), we should be able to do it via `new Request` too, although it's not clear to me if `<link rel="preload" href="/blah" as="image">` produces a request with context "image", or a request with context "preload" that otherwise looks like an image request (`Accept` etc).

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

Received on Friday, 31 July 2015 11:02:05 UTC