-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Synchronous AJAX requests are deprecated warning #364
Comments
I am having the same problem. I believe that it has to do with the XMLHttpRequest.open(). As noted here https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/open, shows that...
In pace.js I have tried to add the parameter on line 428 and on line 434 But have had no luck. Anyone have any other ideas? |
also having this issue. |
also still has a same open issue #199. |
Check if your AJAX call is set to false (async: false), if not then the chances are that you have some extensions running on your browser that do a synchronous call back. Easy way to identify is to open the console in Chrome, enable "Log XMLHttpRequests" and you will be able to see the extension that is causing the issue to be reported. Hope this helps. |
@sujitswaroop Changed from Pace JS 1.0.0. to 0.7.8. version, however I don't see any difference. In fact my Crome console is pointing now to the line In both case I get similar warning: Is there any permanent solution for this, please? |
I just tried 1.0.2 and have this issue as well |
For me this was happening in the context of doing AJAX(
|
In the error message you will find the document of the "XMLHttpRequest" At the 1/6 of the page (scroll down) you will find this: Synchronous XMLHttpRequest outside of workers is in the process of being removed from the web platform as it has detrimental effects to the end user’s experience. (This is a long process that takes many years.) Developers must not pass false for the async argument when current global object is a Window object. User agents are strongly encouraged to warn about such usage in developer tools and may experiment with throwing an "InvalidAccessError" DOMException when it occurs. long way, but you better use to use Service Workers https://developers.google.com/web/fundamentals/primers/service-workers/ |
Thanks Hlawuleka I had Async set to FALSE for some reason.... xmlhttp = new XMLHttpRequest(); |
When refreshing a page via a top-level document.write(), I get the following warning in Chrome Developer Tools:
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
So I was simply wondering where and why synchronous AJAX requests are used within pace. As the warning suggests, this is generally considered bad behaviour, and I suggest that you guys find a workaround ASAP.
The text was updated successfully, but these errors were encountered: