-
Notifications
You must be signed in to change notification settings - Fork 167
Clarify how manifest image resources are fetched #1171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
My main thoughts here are:
It's hard to know how important keeping this consistent, if there is a requirement out there someone would have here. I think my biggest concern would just be consistency. HOWEVER - I think also we have an effort to decouple the manifest parsing from the document. There are a lot of benefits there too, allowing services to cache data about a manifest & the icons for distribution. But - yeah - not sure what the right answer is here. edit: Having this always go through the document also means that you can hit the serviceworker in an offline setting. |
I tend to agree that icon/image fetching should be possible outside of the document the manifest was linked from. There could be all kinds of architecture designs for how to install an application where the functions of downloading, caching and updating icons are delegated to browser chrome or the underlying operating system. In Firefox OS for example I believe at least at one point icons were initially fetched by browser/system chrome to provide a preview but then stored (in IndexedDB) and managed by the separate homescreen application after installation. In general anything that helps decouple app installation from the document is a good thing from my point of view. An edge case I can imagine that could create a problem is if fetching an image resource requires some form of authentication like a cookie being set, but there all kinds of reasons why I think that should be discouraged. FWIW in WebThings Shell we currently fetch icons from system chrome rather than the document, but there's still work to do there around caching and updating images. |
I got confirmation too that in WebKit it's done through using there document as well (i.e., CSP applies). So yeah, we should just say, go through the algorithm "fetching an image resource". The problem with decoupling it from the document is that it would break the CSP policies, service worker served icons, etc. |
@benfrancis, although rare, there could be a case where the icons might be pulled from a service worker - which seems like a valid thing to do. In such a case, it would need to through the document context to get to the service worker. |
displaying it to the user, for example by rounding the corners or | ||
painting it in a specific color. It is recommended that developers | ||
prepare their image resources for such scenarios to avoid losing | ||
important information through, e.g., change of color or clipped | ||
corners. | ||
</p> | ||
<p> | ||
User agents MUST [=fetch=] an [=manifest image resource=] by running the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a request to be passed, a response to be handled.
At written, this doesn't make sense at the moment, because the other spec takes an optional request .... the request needs to come from some context...
We might be able to get away with putting this int the spec with an issue, but it won't buy us much.
This needs to describe, for example, how this interacts with the Cache API via service workers, for instance.
The Fetching an image resource algorithm in Image Resource would have to be adjusted. |
Closes #910
This change (choose at least one, delete ones that don't apply):
Implementation commitment (delete if not making normative changes):
If change is normative, and it adds or changes a member:
Commit message:
(Fill in. If making normative changes, describe exactly what the behavioral
difference will be.)
Person merging, please make sure that commits are squashed with one of the following as a commit message prefix:
Preview | Diff