Skip to content

sendBeacon is always blocked #88

Description

@da2x
  1. Install NoScript but configure it to allow everything on every origin by default
  2. Open https://example.com
  3. Open your browser’s developer console
  4. Configure it to show network requests (toggle Requests in the filter bar)
  5. Execute this in the console: navigator.sendBeacon('https://clients1.google.com/generate_204', {'test': 1})
  6. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions