Im dynamically populating image into a container div, using the $.post() function. Whenever I have a different filtering for the images, I abort the current request, however, I have troubles when navigating to another page on my site. Ive realised, that I should abort the current request there as well, however, it struggles under Safari while not under Chrome.
Initialising the request:
var request = $.post( ... );
When running another one:
request.abort();
request = $.post( ... );
When navigating away, to another page:
$(window).unload(function() { request.abort(); });
Could there be any reason why it does not work or at least, not always under Safari? Thanks!