{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/ServiceWorker/issues/870","repository_url":"https://api.github.com/repos/w3c/ServiceWorker","labels_url":"https://api.github.com/repos/w3c/ServiceWorker/issues/870/labels{/name}","comments_url":"https://api.github.com/repos/w3c/ServiceWorker/issues/870/comments","events_url":"https://api.github.com/repos/w3c/ServiceWorker/issues/870/events","html_url":"https://github.com/w3c/ServiceWorker/issues/870","id":146343329,"number":870,"title":"Inconsistencies due to when clients are created","user":{"login":"jakearchibald","id":93594,"avatar_url":"https://avatars.githubusercontent.com/u/93594?v=3","gravatar_id":"","url":"https://api.github.com/users/jakearchibald","html_url":"https://github.com/jakearchibald","followers_url":"https://api.github.com/users/jakearchibald/followers","following_url":"https://api.github.com/users/jakearchibald/following{/other_user}","gists_url":"https://api.github.com/users/jakearchibald/gists{/gist_id}","starred_url":"https://api.github.com/users/jakearchibald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakearchibald/subscriptions","organizations_url":"https://api.github.com/users/jakearchibald/orgs","repos_url":"https://api.github.com/users/jakearchibald/repos","events_url":"https://api.github.com/users/jakearchibald/events{/privacy}","received_events_url":"https://api.github.com/users/jakearchibald/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/w3c/ServiceWorker/milestones/2","html_url":"https://github.com/w3c/ServiceWorker/milestones/Version%201","labels_url":"https://api.github.com/repos/w3c/ServiceWorker/milestones/2/labels","id":746092,"number":2,"title":"Version 1","description":"","creator":{"login":"tobie","id":3392,"avatar_url":"https://avatars.githubusercontent.com/u/3392?v=3","gravatar_id":"","url":"https://api.github.com/users/tobie","html_url":"https://github.com/tobie","followers_url":"https://api.github.com/users/tobie/followers","following_url":"https://api.github.com/users/tobie/following{/other_user}","gists_url":"https://api.github.com/users/tobie/gists{/gist_id}","starred_url":"https://api.github.com/users/tobie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobie/subscriptions","organizations_url":"https://api.github.com/users/tobie/orgs","repos_url":"https://api.github.com/users/tobie/repos","events_url":"https://api.github.com/users/tobie/events{/privacy}","received_events_url":"https://api.github.com/users/tobie/received_events","type":"User","site_admin":false},"open_issues":24,"closed_issues":167,"state":"open","created_at":"2014-08-07T10:50:36Z","updated_at":"2016-09-07T01:16:13Z","due_on":"2016-03-30T15:00:00Z","closed_at":null},"comments":45,"created_at":"2016-04-06T15:06:28Z","updated_at":"2016-09-08T11:43:03Z","closed_at":null,"body":"https://jakearchibald.github.io/isserviceworkerready/demos/clients-count/\r\n\r\n1. Visit the above\r\n2. Hit shift + refresh\r\n3. Hit refresh\r\n\r\nChrome says 1, Firefox says 0.\r\n\r\nThe Firefox behaviour seems right to me, but unless I'm reading it wrong, the spec isn't clear around this. This might be because of earlier confusion around when clients are created.\r\n\r\nFrom https://html.spec.whatwg.org/multipage/browsers.html#navigating-across-documents:\r\n\r\n> Set request's client to the source browsing context's active document's Window object's environment settings object\r\n\r\nIf I'm reading this correctly, the client is the window being navigated, not a new client ready for the new page.\r\n\r\nFrom https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#on-fetch-request-algorithm 12.1:\r\n\r\n> If client is not a secure context, return null.\r\n\r\nThis seems to assume that the client is a new client ready for the new page, but doesn't this mean that SW will fail if you're navigating *from* an unrelated insecure page?"},"comment":{"url":"https://api.github.com/repos/w3c/ServiceWorker/issues/comments/245572080","html_url":"https://github.com/w3c/ServiceWorker/issues/870#issuecomment-245572080","issue_url":"https://api.github.com/repos/w3c/ServiceWorker/issues/870","id":245572080,"user":{"login":"jungkees","id":1331169,"avatar_url":"https://avatars.githubusercontent.com/u/1331169?v=3","gravatar_id":"","url":"https://api.github.com/users/jungkees","html_url":"https://github.com/jungkees","followers_url":"https://api.github.com/users/jungkees/followers","following_url":"https://api.github.com/users/jungkees/following{/other_user}","gists_url":"https://api.github.com/users/jungkees/gists{/gist_id}","starred_url":"https://api.github.com/users/jungkees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jungkees/subscriptions","organizations_url":"https://api.github.com/users/jungkees/orgs","repos_url":"https://api.github.com/users/jungkees/repos","events_url":"https://api.github.com/users/jungkees/events{/privacy}","received_events_url":"https://api.github.com/users/jungkees/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T11:43:03Z","updated_at":"2016-09-08T11:43:03Z","body":"In https://github.com/w3c/ServiceWorker/issues/870#issuecomment-245559217's \"New Window Navigation\" case, `targetClientId` may be the client for initial `about:blank` instead of `undefined`. When `target=\"_blank\"` is set a new browsing context is created loading the initial `about:blank` and then it navigates to the designated resource I guess."}}
{"actor":{"display_login":"jungkees"}}