javascript - Why async ajax request not executed when using history.back -


i have snippet:

functionthatmakeasyncajaxcall(url, data); history.back() 

i checked in firebug , don't see ajax call server. use jquery make ajax request. checked persist option in firebug.

you need fire history.back() in callback once ajax request complete.

functionthatmakeasyncajaxcall(url, data).then(function(){   history.back(); }); 

here functionthatmakeasyncajaxcall should return promise


Comments