onReadyStateChange not firing in IE for XHR Request

后端 未结 2 1122
死守一世寂寞
死守一世寂寞 2021-01-28 13:50

I have this code that I am using and it works fine in chrome, but in IE, it looks like that onreadystatechenge is not firing.

How do I get this to work cross browser. I

2条回答
  •  自闭症患者
    2021-01-28 14:26

    Your XMLHttpRequest object might be caching.

    Try:

    var myNoCachePage = document.location + '?' + new Date().getTime();
    xhr.open("GET", myNoCachePage, true);  // Prevent IE11 from caching
    xhr.send();
    

提交回复
热议问题