Monday, 7 January 2019

document.location.reload(true) canceled in chrome

I have a function to check if results are on the server.

var d = document;
var dl = d.location;
var w = window;
var wt = w.setTimeout;
var X = XMLHttpRequest;
function _checkreload() {
    var x = new X();
    x.open('GET', '?test=results');
    x.onreadystatechange = function (c) {
        if (x.readyState === 4) {
            if (x.status == 205) {
                dl.reload(true);
            } else {
                wt(_checkreload, 200);
            }
        }
    };
    x.send();
};

_checkreload();

Sometimes the reload is canceled for unknown reason:

enter image description here

Question

How to find out for what reason the reload is canceled?



from document.location.reload(true) canceled in chrome

No comments:

Post a Comment