- Install NoScript but configure it to allow everything on every origin by default
- Open https://example.com
- Open your browser’s developer console
- Configure it to show network requests (toggle Requests in the filter bar)
- Execute this in the console:
navigator.sendBeacon('https://clients1.google.com/generate_204', {'test': 1})
- Wait a few seconds.
Actual: sendBeacon returns true but then doesn’t send any requests.
Expect: either sendBeacon should return true (the request was accepted and queued) and send the network request within a few seconds, OR it should return false (the request was rejected).
Notes: sendBeacon is a generic method for sending POST requests. It should be classified the same as xmlhttprequest and fetch, and not the same as a[ping]. Or maybe reclassify xmlhttprequest->post, beacon, and ping as a new type “post“ if you really want to differentiate between retrieving and sending data.
navigator.sendBeacon('https://clients1.google.com/generate_204', {'test': 1})Actual: sendBeacon returns
truebut then doesn’t send any requests.Expect: either sendBeacon should return
true(the request was accepted and queued) and send the network request within a few seconds, OR it should returnfalse(the request was rejected).Notes: sendBeacon is a generic method for sending POST requests. It should be classified the same as
xmlhttprequestandfetch, and not the same asa[ping]. Or maybe reclassifyxmlhttprequest->post,beacon, andpingas a new type “post“ if you really want to differentiate between retrieving and sending data.