{"action":"created","issue":{"url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/885","repository_url":"https://api.github.com/repos/slightlyoff/ServiceWorker","labels_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/885/labels{/name}","comments_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/885/comments","events_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/885/events","html_url":"https://github.com/slightlyoff/ServiceWorker/issues/885","id":148771947,"number":885,"title":"should EventSource bypass service worker interception?","user":{"login":"wanderview","id":1256526,"avatar_url":"https://avatars.githubusercontent.com/u/1256526?v=3","gravatar_id":"","url":"https://api.github.com/users/wanderview","html_url":"https://github.com/wanderview","followers_url":"https://api.github.com/users/wanderview/followers","following_url":"https://api.github.com/users/wanderview/following{/other_user}","gists_url":"https://api.github.com/users/wanderview/gists{/gist_id}","starred_url":"https://api.github.com/users/wanderview/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanderview/subscriptions","organizations_url":"https://api.github.com/users/wanderview/orgs","repos_url":"https://api.github.com/users/wanderview/repos","events_url":"https://api.github.com/users/wanderview/events{/privacy}","received_events_url":"https://api.github.com/users/wanderview/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-15T21:19:31Z","updated_at":"2016-04-16T03:34:34Z","closed_at":null,"body":"Currently we support intercepting EventSource.  I'm even adding a wpt test for this since its a way to observe a different FetchEvent.request.cache value.\r\n\r\nWhile writing that test, though, it became apparent that EventSource is currently difficult to use with ServiceWorker.  EventSource is designed with the idea that the connection will be held open and lines will be flushed across the connection to trigger events.  This is quite difficult to do today with synthetic responses.  It might be possible in the future with streams, but you would still have to hold the SW alive.\r\n\r\n@sicking suggested that we might want to treat EventSource like WebSocket and just bypass the service worker for now.\r\n\r\nI feel like this is kind of a low priority item, but wanted to file the issue so we don't lose track of it."},"comment":{"url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/comments/210726448","html_url":"https://github.com/slightlyoff/ServiceWorker/issues/885#issuecomment-210726448","issue_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/885","id":210726448,"user":{"login":"annevk","id":1544111,"avatar_url":"https://avatars.githubusercontent.com/u/1544111?v=3","gravatar_id":"","url":"https://api.github.com/users/annevk","html_url":"https://github.com/annevk","followers_url":"https://api.github.com/users/annevk/followers","following_url":"https://api.github.com/users/annevk/following{/other_user}","gists_url":"https://api.github.com/users/annevk/gists{/gist_id}","starred_url":"https://api.github.com/users/annevk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annevk/subscriptions","organizations_url":"https://api.github.com/users/annevk/orgs","repos_url":"https://api.github.com/users/annevk/repos","events_url":"https://api.github.com/users/annevk/events{/privacy}","received_events_url":"https://api.github.com/users/annevk/received_events","type":"User","site_admin":false},"created_at":"2016-04-16T03:34:34Z","updated_at":"2016-04-16T03:34:34Z","body":"WebSocket is special in that it's an HTTP handshake and then uses the connection for something else. EventSource is just like any other API that fetches something, it's just by design a longer-lived transaction, but that is not too different from `<video>` or `<audio>` really."}}