Synchronous XMLHttpRequest on the main thread is deprecated warning?

154 views
Skip to first unread message

Nino Porcino

unread,
Jan 31, 2018, 12:10:53 PM1/31/18
to DroidScript
I have a background service that uses 3rd part javascript libraries (e.g. firebase.js) and I get the following warning on the console:

svc: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects ...

I wonder if I should worry or can I just ignore it? 

My suspect is that firebase is using XMLHttpRequest somewhere in its code, but there's nothing I can do. 

Steve Garman

unread,
Jan 31, 2018, 3:36:49 PM1/31/18
to DroidScript
Lots of libraries seem to give this warning on lots of platforms.

The message is quite correct, synchronous XMLHttpRequest is only intended for workers and there are plans to remove it in the main thread in the future.

Presumably by then there will have been a lot of noise about it and most libraries will be fixed to avoid the problem before V8 and browsers implement the change.

Using it at all is a dubious practice but it looks like you are stuck with it for now.

Reply all
Reply to author
Forward
0 new messages