Paul Tomblin Paul Tomblin - 5 months ago 5x
Javascript Question

Possible to make AJAX call that doesn't return?

Is it possible to send an jQuery.ajax call or equivalent without any sort of response? I want to trigger something on the server as I leave the page with the onbeforeunload command, but it's not something I need to feedback to the client, so I just want to send off the command and not wait for a response.

Is that possible?


Every request has a response. Even if the server throws an error a response is coming back with the error.

You can ignore the response if you like to just don't add a success callback.

    url: "theURL",
    data: theData