Does fetch API allow Post request to run in background even when user moves to a different url?

360 Views Asked by At

Beacon Post messages would run in background and can even send data when user moves on to a new page. Does Fetch have similar functionality? Someone said it runs in a separate background process, but I couldn't find any documentation that validates this.

1

There are 1 best solutions below

0
On BEST ANSWER

Looks like Fetch is no different than XHR. It just performs better due to browser's implementation of it. There is no specification which says Fetch will perform better than XHR for POST on Unload event.