Send beacon API

Required reading:

https://volument.com/blog/sendbeacon-is-broken#comments