{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/manifest/issues/384","labels_url":"https://api.github.com/repos/w3c/manifest/issues/384/labels{/name}","comments_url":"https://api.github.com/repos/w3c/manifest/issues/384/comments","events_url":"https://api.github.com/repos/w3c/manifest/issues/384/events","html_url":"https://github.com/w3c/manifest/issues/384","id":92482062,"number":384,"title":"Updating is under/incorrectly specified","user":{"login":"benfrancis","id":552417,"avatar_url":"https://avatars.githubusercontent.com/u/552417?v=3","gravatar_id":"","url":"https://api.github.com/users/benfrancis","html_url":"https://github.com/benfrancis","followers_url":"https://api.github.com/users/benfrancis/followers","following_url":"https://api.github.com/users/benfrancis/following{/other_user}","gists_url":"https://api.github.com/users/benfrancis/gists{/gist_id}","starred_url":"https://api.github.com/users/benfrancis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benfrancis/subscriptions","organizations_url":"https://api.github.com/users/benfrancis/orgs","repos_url":"https://api.github.com/users/benfrancis/repos","events_url":"https://api.github.com/users/benfrancis/events{/privacy}","received_events_url":"https://api.github.com/users/benfrancis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/w3c/manifest/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/w3c/manifest/labels/P2","name":"P2","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-07-01T20:50:15Z","updated_at":"2015-07-08T13:59:12Z","closed_at":null,"body":"The spec says that the user agent may \"periodically check if the contents of a manifest has been modified (e.g., by honoring HTTP cache directives associated with the manifest or by checking for updates after the web application has been launched).\"\r\n\r\nFirstly, being able to periodically check the contents of the manifest requires that the manifest URL does not change. If the manifest URL changes, there's no way to know that any new manifest corresponds to the same app as the old manifest and the only way for the app's metadata to be updated is for the user to re-install the app.\r\n\r\nThe removal of the same-origin restriction on manifest URLs was intended mainly to allow CDNs to host the manifest on a separate origin to the app, but the above assumes that CDNs are well behaved in that they never change the URL of the manifest, or as a minimum provide a redirect. @slightlylate assures me that CDNs these days are well behaved and do not change URLs of resources. Does anyone have any additional data on that?\r\n\r\nSo assuming the manifest URL does not change, or at least provides redirects, the user agent can \"periodically check the contents\" of the manifest to see whether something has been updated. Then the spec says that \"in the event that the members of the manifest have been updated, as determined by running the steps for processing a manifest and seeing if anything has changed, the user agent MAY update the metadata corresponding to the web application \".\r\n\r\nNow during the \"steps for processing the manifest\" the spec says that the start_url must be checked to be same origin with the document URL, that is the document the app was installed from. The same is true for the scope property. If the user agent is just \"periodically checking the contents\" of the manifest, does it need to also keep a record of the URL of the document the app was installed from, in order to make these checks? Note that this URL may be different for every installation as an app can be installed from any page of the app.\r\n\r\nSo assuming that CDNs behave well, the manifest URL doesn't change, and we've stored the document URL, we can then periodically check the contents of the manifest. Does this work for authenticated manifest URLs too? How does the user agent get the necessary credentials to fetch the manifest? Is the check only done by the user agent when the user logs in and uses the app?\r\n\r\nIt sounds like the implementation in Chrome may also be based on some additional assumptions regarding a registered Service Worker scope, is that the case? @mounirlamouri ?\r\n\r\nIf the assumptions above are in fact assumptions made by the spec, do we need to write something in the spec about the fact that user agents do not expect the manifest URL to change, and that therefore CDNs are expected to keep the same URL for the manifest or provide a redirect?"},"comment":{"url":"https://api.github.com/repos/w3c/manifest/issues/comments/119588315","html_url":"https://github.com/w3c/manifest/issues/384#issuecomment-119588315","issue_url":"https://api.github.com/repos/w3c/manifest/issues/384","id":119588315,"user":{"login":"benfrancis","id":552417,"avatar_url":"https://avatars.githubusercontent.com/u/552417?v=3","gravatar_id":"","url":"https://api.github.com/users/benfrancis","html_url":"https://github.com/benfrancis","followers_url":"https://api.github.com/users/benfrancis/followers","following_url":"https://api.github.com/users/benfrancis/following{/other_user}","gists_url":"https://api.github.com/users/benfrancis/gists{/gist_id}","starred_url":"https://api.github.com/users/benfrancis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benfrancis/subscriptions","organizations_url":"https://api.github.com/users/benfrancis/orgs","repos_url":"https://api.github.com/users/benfrancis/repos","events_url":"https://api.github.com/users/benfrancis/events{/privacy}","received_events_url":"https://api.github.com/users/benfrancis/received_events","type":"User","site_admin":false},"created_at":"2015-07-08T13:59:12Z","updated_at":"2015-07-08T13:59:12Z","body":"> artifact of when we thought we could have a stable URL for the manifest. \r\n\r\nWe have to have a stable URL for locating the manifest resource for describing a site, or the user agent can not retrieve an updated version of the resource, that's what URLs are for.\r\n\r\nIf any manifest resource linked from any page of the site is assumed to supercede any previously retrieved manifest from any other page, then the default scope has to be the origin of the app. But that seems like a dangerous and unreliable updating strategy."}}