{"action":"created","comment":{"url":"https://api.github.com/repos/jeffposnick/WebFundamentals/pulls/comments/47929426","id":47929426,"diff_hunk":"@@ -0,0 +1,170 @@\n+---\n+layout: shared/narrow\n+published: false\n+title: \"Setting up a basic service worker\"\n+description: \"This section describes the most basic service worker possible. It shows you how a client gets, or registers, a service worker. It shows you how a service worker prepares to act as a proxy for its clients. Both subjects have more depth than is shown in this section. It's not intended to be comprehensive; It's intended to give you a basic foundation on which to build service worker knowledge.\"\n+authors:\n+  - josephmedley\n+published_on: 2015-10-01\n+updated_on: 2015-10-01\n+order: 4\n+key-takeaways:\n+  tldr:   \n+  - \"Call <code>register()</code> to install a service worker.\" \n+  - \"Learn to use promises before attempting service workers.\"\n+  - \"Service workers have a limited scope and requrie HTTPS.\"\n+  - \"The install process has two events: install and activate.\"\n+  - \"The user has to navigate before the service worker start proxying.\"\n+  - \"Call <code>waintUntil()</code> to keep a service worker out of its own way.\"","path":"src/content/en/fundamentals/primers/service-workers/a-basic-service-worker.markdown","position":18,"original_position":18,"commit_id":"ee52349437206b51c645eab945de1dbd28e2f41a","original_commit_id":"ee52349437206b51c645eab945de1dbd28e2f41a","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},"body":"\"waintUntil\" should be \"waitUntil\"\r\n\r\nHowever, this line seems a bit vague and maybe misleading. Could be something like \"Pass a promise to `waitUntil()` to indicate success/failure of asynchronous tasks\".","created_at":"2015-12-17T16:50:03Z","updated_at":"2015-12-17T16:50:03Z","html_url":"https://github.com/jeffposnick/WebFundamentals/pull/1#discussion_r47929426","pull_request_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/jeffposnick/WebFundamentals/pulls/comments/47929426"},"html":{"href":"https://github.com/jeffposnick/WebFundamentals/pull/1#discussion_r47929426"},"pull_request":{"href":"https://api.github.com/repos/jeffposnick/WebFundamentals/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/jeffposnick/WebFundamentals/pulls/1","id":53999397,"html_url":"https://github.com/jeffposnick/WebFundamentals/pull/1","diff_url":"https://github.com/jeffposnick/WebFundamentals/pull/1.diff","patch_url":"https://github.com/jeffposnick/WebFundamentals/pull/1.patch","issue_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/issues/1","number":1,"state":"open","locked":false,"title":"Added the service workers primer.","user":{"login":"jeffposnick","id":1749548,"avatar_url":"https://avatars.githubusercontent.com/u/1749548?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffposnick","html_url":"https://github.com/jeffposnick","followers_url":"https://api.github.com/users/jeffposnick/followers","following_url":"https://api.github.com/users/jeffposnick/following{/other_user}","gists_url":"https://api.github.com/users/jeffposnick/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffposnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffposnick/subscriptions","organizations_url":"https://api.github.com/users/jeffposnick/orgs","repos_url":"https://api.github.com/users/jeffposnick/repos","events_url":"https://api.github.com/users/jeffposnick/events{/privacy}","received_events_url":"https://api.github.com/users/jeffposnick/received_events","type":"User","site_admin":false},"body":"@jpmedley I've created this PR with all the service worker material to facilitate commenting.","created_at":"2015-12-17T16:36:43Z","updated_at":"2015-12-17T16:50:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f59a71fbc0325ea456821bd7476c018fcb7c4177","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/pulls/1/commits","review_comments_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/pulls/1/comments","review_comment_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/issues/1/comments","statuses_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/statuses/ee52349437206b51c645eab945de1dbd28e2f41a","head":{"label":"jeffposnick:with-service-workers","ref":"with-service-workers","sha":"ee52349437206b51c645eab945de1dbd28e2f41a","user":{"login":"jeffposnick","id":1749548,"avatar_url":"https://avatars.githubusercontent.com/u/1749548?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffposnick","html_url":"https://github.com/jeffposnick","followers_url":"https://api.github.com/users/jeffposnick/followers","following_url":"https://api.github.com/users/jeffposnick/following{/other_user}","gists_url":"https://api.github.com/users/jeffposnick/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffposnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffposnick/subscriptions","organizations_url":"https://api.github.com/users/jeffposnick/orgs","repos_url":"https://api.github.com/users/jeffposnick/repos","events_url":"https://api.github.com/users/jeffposnick/events{/privacy}","received_events_url":"https://api.github.com/users/jeffposnick/received_events","type":"User","site_admin":false},"repo":{"id":43522974,"name":"WebFundamentals","full_name":"jeffposnick/WebFundamentals","owner":{"login":"jeffposnick","id":1749548,"avatar_url":"https://avatars.githubusercontent.com/u/1749548?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffposnick","html_url":"https://github.com/jeffposnick","followers_url":"https://api.github.com/users/jeffposnick/followers","following_url":"https://api.github.com/users/jeffposnick/following{/other_user}","gists_url":"https://api.github.com/users/jeffposnick/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffposnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffposnick/subscriptions","organizations_url":"https://api.github.com/users/jeffposnick/orgs","repos_url":"https://api.github.com/users/jeffposnick/repos","events_url":"https://api.github.com/users/jeffposnick/events{/privacy}","received_events_url":"https://api.github.com/users/jeffposnick/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jeffposnick/WebFundamentals","description":"Best practices for modern web development","fork":true,"url":"https://api.github.com/repos/jeffposnick/WebFundamentals","forks_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/forks","keys_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/teams","hooks_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/hooks","issue_events_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/issues/events{/number}","events_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/events","assignees_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/assignees{/user}","branches_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/branches{/branch}","tags_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/tags","blobs_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/git/refs{/sha}","trees_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/statuses/{sha}","languages_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/languages","stargazers_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/stargazers","contributors_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/contributors","subscribers_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/subscribers","subscription_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/subscription","commits_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/commits{/sha}","git_commits_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/git/commits{/sha}","comments_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/comments{/number}","issue_comment_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/issues/comments{/number}","contents_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/contents/{+path}","compare_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/merges","archive_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/downloads","issues_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/issues{/number}","pulls_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/pulls{/number}","milestones_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/milestones{/number}","notifications_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/labels{/name}","releases_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/releases{/id}","created_at":"2015-10-01T21:45:47Z","updated_at":"2015-10-01T21:46:18Z","pushed_at":"2015-12-17T16:36:43Z","git_url":"git://github.com/jeffposnick/WebFundamentals.git","ssh_url":"git@github.com:jeffposnick/WebFundamentals.git","clone_url":"https://github.com/jeffposnick/WebFundamentals.git","svn_url":"https://github.com/jeffposnick/WebFundamentals","homepage":"https://developers.google.com/web/fundamentals","size":894253,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"jeffposnick:sans-service-workers","ref":"sans-service-workers","sha":"d089cb32b183098aa1e91bf73795d4b574d8d95c","user":{"login":"jeffposnick","id":1749548,"avatar_url":"https://avatars.githubusercontent.com/u/1749548?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffposnick","html_url":"https://github.com/jeffposnick","followers_url":"https://api.github.com/users/jeffposnick/followers","following_url":"https://api.github.com/users/jeffposnick/following{/other_user}","gists_url":"https://api.github.com/users/jeffposnick/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffposnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffposnick/subscriptions","organizations_url":"https://api.github.com/users/jeffposnick/orgs","repos_url":"https://api.github.com/users/jeffposnick/repos","events_url":"https://api.github.com/users/jeffposnick/events{/privacy}","received_events_url":"https://api.github.com/users/jeffposnick/received_events","type":"User","site_admin":false},"repo":{"id":43522974,"name":"WebFundamentals","full_name":"jeffposnick/WebFundamentals","owner":{"login":"jeffposnick","id":1749548,"avatar_url":"https://avatars.githubusercontent.com/u/1749548?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffposnick","html_url":"https://github.com/jeffposnick","followers_url":"https://api.github.com/users/jeffposnick/followers","following_url":"https://api.github.com/users/jeffposnick/following{/other_user}","gists_url":"https://api.github.com/users/jeffposnick/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffposnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffposnick/subscriptions","organizations_url":"https://api.github.com/users/jeffposnick/orgs","repos_url":"https://api.github.com/users/jeffposnick/repos","events_url":"https://api.github.com/users/jeffposnick/events{/privacy}","received_events_url":"https://api.github.com/users/jeffposnick/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jeffposnick/WebFundamentals","description":"Best practices for modern web development","fork":true,"url":"https://api.github.com/repos/jeffposnick/WebFundamentals","forks_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/forks","keys_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/teams","hooks_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/hooks","issue_events_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/issues/events{/number}","events_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/events","assignees_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/assignees{/user}","branches_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/branches{/branch}","tags_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/tags","blobs_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/git/refs{/sha}","trees_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/statuses/{sha}","languages_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/languages","stargazers_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/stargazers","contributors_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/contributors","subscribers_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/subscribers","subscription_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/subscription","commits_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/commits{/sha}","git_commits_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/git/commits{/sha}","comments_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/comments{/number}","issue_comment_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/issues/comments{/number}","contents_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/contents/{+path}","compare_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/merges","archive_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/downloads","issues_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/issues{/number}","pulls_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/pulls{/number}","milestones_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/milestones{/number}","notifications_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/labels{/name}","releases_url":"https://api.github.com/repos/jeffposnick/WebFundamentals/releases{/id}","created_at":"2015-10-01T21:45:47Z","updated_at":"2015-10-01T21:46:18Z","pushed_at":"2015-12-17T16:36:43Z","git_url":"git://github.com/jeffposnick/WebFundamentals.git","ssh_url":"git@github.com:jeffposnick/WebFundamentals.git","clone_url":"https://github.com/jeffposnick/WebFundamentals.git","svn_url":"https://github.com/jeffposnick/WebFundamentals","homepage":"https://developers.google.com/web/fundamentals","size":894253,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jeffposnick/WebFundamentals/pulls/1"},"html":{"href":"https://github.com/jeffposnick/WebFundamentals/pull/1"},"issue":{"href":"https://api.github.com/repos/jeffposnick/WebFundamentals/issues/1"},"comments":{"href":"https://api.github.com/repos/jeffposnick/WebFundamentals/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/jeffposnick/WebFundamentals/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/jeffposnick/WebFundamentals/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jeffposnick/WebFundamentals/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/jeffposnick/WebFundamentals/statuses/ee52349437206b51c645eab945de1dbd28e2f41a"}}}}