re: Sure you want to leave?—browser beforeunload event VIEW POST

re: Any idea how to perform graphql mutation with sendBeacon?

Well, you send off a POST request with sendBeacon. You'd tell your server (on some HTTP handler) to do something, but you wouldn't be able to see whether the result was successful.


The issue with this I can not set headers or on some way control it. I am using synchronous XMLHttp request, it runs on all browsers but slows down a little navigation and it is not also the most happier solution. I do not need to see the result I just need to save analytics data to db on browser close.

code of conduct - report abuse