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);       }    }) 

  1. make sure preserve log upon navigation enabled in chrome dev tools settings. enter image description here
  2. let

    window.location = '/whatever/address'; 

    be last thing call, or later using

    settimeout( function () {      window.location = '/whatever/address';  }, 1);` 
  3. beware values of variables lost on new page load / navigation

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -