开发者

Detect a 304 redirection on an AJAX request

is there a way to detect whether an AJAX request has been redirected through a 304 response ? I tried an onreadystagechange with xhr.status==304 but got nothing. Are we only bound to 200 response codes ?

The issue was already raised on SO but I coul开发者_运维技巧dn't find any answer...


if (xhr.status == 304){
    //do your code
}

It should 100% work

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜