Skip to content
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

Explain how storage works after a bundle is downloaded. #588

Merged
merged 1 commit into from Jul 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions explainers/bundle-urls-and-origins.md
Expand Up @@ -37,6 +37,7 @@ Participate:
- [`postMessage` source origin](#postmessage-source-origin)
- [Rendering the URL bar](#rendering-the-url-bar)
- [Permissions](#permissions)
- [Downloading bundles](#downloading-bundles)
- [Detailed design discussion](#detailed-design-discussion)
- [Exactly how do we compose the package: URL?](#exactly-how-do-we-compose-the-package-url)
- [Considered alternatives](#considered-alternatives)
Expand Down Expand Up @@ -414,6 +415,26 @@ as cross-origin from its server, and only allow permission requests if the
server sends a `Permissions-Policy: geolocation=(self
"package:https://server.example")` header.

### Downloading bundles

If the user downloads a bundle, by default it has a new *bundle URL* referring
to its new location, and so it loses access to any storage it created while the
user was using it online. This is undesirable, so user agents should take
measures to avoid confusion and lost data. It's not clear yet what those
measures should be:

1. Store a mapping between the offline location and the online location, and
treat them as same-origin.
* This can't _just_ be the offline bundle's Mark Of The Web, because if the
user received the bundle on an SD card, that mark isn't trustworthy.
* Storing the offline location in a trusted place could still cause trouble
if the user later mounts a less-trusted bundle there.
* The browser could safely store a hash of the offline bundle.
1. Copy storage from the online bundle to the offline bundle when it's
downloaded.
* This could be confusing if the user continues updating the offline storage
and then goes back to the online bundle.

## Detailed design discussion

### Exactly how do we compose the package: URL?
Expand Down