Any idea why this code works:
$.ajax({
type: 'GET',
url: 'delete_image.php'
});
And this one doesn't:
$(window).unload(function() {
$.ajax({
type: 'GET',
url: 'delete_image.php'
});
});
In delete_image.php, I just have:
unlink('test.jpg');