Avoid making synchronous AJAX requests during unload in Safari

- Safari will sometimes crash if a synchronous request is made
- This applies to both the desktop and mobile versions of Safari

#2650