w3c / ServiceWorker

Service Workers
https://w3c.github.io/ServiceWorker/
Other
3.63k stars 313 forks source link

Will Service Worker be able to manipulate Beacon requests? #278

Closed matthew-andrews closed 10 years ago

matthew-andrews commented 10 years ago

https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/Beacon/Overview.html#sec-sendBeacon-method

If so, would it sit behind or in front of the beacon?

(ie. would you handle the request event as it is dispatched from the application, or when the browser schedules it? - My preference would be when the browser schedules it)

Also would Service Worker be able to send its own beacons?

annevk commented 10 years ago

Beacons will go through it (defined in terms of Fetch, have not skip server worker flag set) and I suspect it would be able to transmit its own, yes (depends on whether they expose the API to workers).