{"action":"created","issue":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/2880","repository_url":"https://api.github.com/repos/gatsbyjs/gatsby","labels_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/2880/labels{/name}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/2880/comments","events_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/2880/events","html_url":"https://github.com/gatsbyjs/gatsby/issues/2880","id":273049333,"number":2880,"title":"How to remove Service Worker created by gatsby-plugin-offline?","user":{"login":"pedromartinez11","id":699998,"avatar_url":"https://avatars2.githubusercontent.com/u/699998?v=4","gravatar_id":"","url":"https://api.github.com/users/pedromartinez11","html_url":"https://github.com/pedromartinez11","followers_url":"https://api.github.com/users/pedromartinez11/followers","following_url":"https://api.github.com/users/pedromartinez11/following{/other_user}","gists_url":"https://api.github.com/users/pedromartinez11/gists{/gist_id}","starred_url":"https://api.github.com/users/pedromartinez11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedromartinez11/subscriptions","organizations_url":"https://api.github.com/users/pedromartinez11/orgs","repos_url":"https://api.github.com/users/pedromartinez11/repos","events_url":"https://api.github.com/users/pedromartinez11/events{/privacy}","received_events_url":"https://api.github.com/users/pedromartinez11/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-11-10T20:26:21Z","updated_at":"2017-12-06T22:31:42Z","closed_at":null,"author_association":"NONE","body":"I would like to remove the service worker on my site.\r\nI removed gatsby-plugin-offline from my gatsby-config and tried doing this in my index page:\r\n```\r\nconsole.log('removing service worker')\r\nif (typeof window !== 'undefined') {\r\n  if ('serviceWorker' in window.navigator) {\r\n    window.navigator.serviceWorker.ready.then(registration => {\r\n      registration.unregister();\r\n    });\r\n  }\r\n}\r\n```\r\n\r\nBut I don't even see `removing service worker` in my console logs. I think it's because the old JS is still being served?"},"comment":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/comments/349796856","html_url":"https://github.com/gatsbyjs/gatsby/issues/2880#issuecomment-349796856","issue_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/2880","id":349796856,"user":{"login":"pedromartinez11","id":699998,"avatar_url":"https://avatars2.githubusercontent.com/u/699998?v=4","gravatar_id":"","url":"https://api.github.com/users/pedromartinez11","html_url":"https://github.com/pedromartinez11","followers_url":"https://api.github.com/users/pedromartinez11/followers","following_url":"https://api.github.com/users/pedromartinez11/following{/other_user}","gists_url":"https://api.github.com/users/pedromartinez11/gists{/gist_id}","starred_url":"https://api.github.com/users/pedromartinez11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedromartinez11/subscriptions","organizations_url":"https://api.github.com/users/pedromartinez11/orgs","repos_url":"https://api.github.com/users/pedromartinez11/repos","events_url":"https://api.github.com/users/pedromartinez11/events{/privacy}","received_events_url":"https://api.github.com/users/pedromartinez11/received_events","type":"User","site_admin":false},"created_at":"2017-12-06T22:31:42Z","updated_at":"2017-12-06T22:31:42Z","author_association":"NONE","body":"When I tried something similar, my \"new\" JS was never delivered to the browser because the SW cached all previous files. So, the new code that removed the SW was never executed."}}
{"actor":{"display_login":"pedromartinez11"}}