'Navigator.sendBeacon() not following server redirects
We're using Navigator.sendBeacon() for analytics purposes. It's supposed to follow server redirects, to allow for the use of different tracking services in a daisychain fashion.
In practice we've noticed some odd behavior. Around half the time - somewhere around the 50% mark - the client fails to follow the redirect chain and just terminates at the first redirect. This behavior is not specific to any particular browser (user agent). The same user agent will sometimes follow the redirect and sometimes not.
This is the redirect we're using (in PHP):
header('Location: ',true,3xx);
3xx - tried 302, 307, etc. No difference in behavior.
Might anyone know how to solve this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
