I have to call post service on browser close and notify user data. I got it working on Chrome and Internet Explorer but on Firefox 30 it is never called. The following is the code snippet, please let me know if any other solutions..
window.onunload = function() {
$.ajax({
url: "http://localhost:9200/doLogout",
type: "POST",
data: {type: 3},
success: function (data, textStatus, jqXHR) {
// ...
},
error: function (jqXHR, textStatus, errorThrown) {
// ...
}
});