jquery - Detect HTTP 301 status code from JavaScript -
i need detect client side if requested file (with xmlhttprequest) had 301 response. reason of doing because need request other files related file user has been redirected , not related first 1 requested. way detect response status code using javascript or jquery?
thanks.
jquery ajax callback function gives out lot of info
$.ajax({ url: "test.php", type: "get", data: {}, datatype:"json", success: function(resp, textstatus, xhr) { //status of request console.log(xhr.status); }, complete: function(xhr, textstatus) { console.log(xhr.status); } });
Comments
Post a Comment