Closed easher closed 5 years ago
Following your example, the sendBeacon request is fired and returns immediately, and the browser then proceeds to initiative the navigation to specified URL — these two requests do not block or depend on each other. Does that answer your question?
I think so, but maybe that wasn't a good example. Here is a different way of phrasing my question. Are the cookies that will be included in a sendBeacon request guaranteed to be only the cookies set in the browser when navigator.sendBeacon returns true in all scheduling cases? Or could it include cookies that were set after the request was queued, but before the request actually fires?
Are the cookies that will be included in a sendBeacon request guaranteed to be only the cookies set in the browser when navigator.sendBeacon returns true in all scheduling cases?
Yes, that should be the case.
Cool, thanks for your help @igrigorik!
Is it guaranteed that sendBeacon's analytics request to 'www.example.com/tracker' will not include any cookies that may be set on the *.example.com domain from the "www.example.com/homePage" response?