javascript - Chrome Dev tools won't show ajax request response -
i have nodejs application make ajax request using jquery. in developer tools response of last ajax request empty if make redirection, otherwise response exists. there logic why wouldn't show response in case of redirection.
i don't understand redirection made in ajax callback , based on values response, redirection made means response exist chrome dev tools won't show it, doing wrong?
here callback
.done(function (response) { if (response.errorcode == "00") { //window.location = "/"; //no response shown if dev tools if uncomment console.log("yeah got response " + response); } })
- make sure
preserve log upon navigation
enabled in chrome dev tools settings. let
window.location = '/whatever/address';
be last thing call, or later using
settimeout( function () { window.location = '/whatever/address'; }, 1);`
- beware values of variables lost on new page load / navigation
Comments
Post a Comment