If we have such code:
window.location = 'http://example.net';
$.ajax({...});
Is any chance that the ajax code will be sent? Or there is no chance, that ajax request will be ever executed? thank you
When the location property is altered, the user agent begins to unload the current document in preparation for the loading of the new one. Only code that is registered into the document or window beforeunload or unload events will execute at that point.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With