How to make navigator.sendBeacon use get method

I want to use navigator.sendBeacon in a client’s website. But it is using POST method and the request is not reaching server, as the request url’s domain is different. I tried different ways of using sendBeacon(), but all are using POST method.

  1. var data = new FormData();
    navigator.sendBeacon(myurl, data);

  2. navigator.sendBeacon(myurl, “”);

  3. navigator.sendBeacon(myurl);

Is there a way to make GET call using sendBeacon()? Or is there any way to use sendBeacon() in a cross domain environment.

95 thoughts on “How to make navigator.sendBeacon use get method”

Leave a Comment