Fix #14379: AJAX requests on unload
No ticket: Small ajax/xhr size optimizations