IONIC + FIREBASE - Synchronous XMLHttpRequest WARNING


#1

Hi,
I am starting out to learn ionic (and its absolutely awesome :))

I am working with firebase and I keep getting this warning -
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help, check http://xhr.spec.whatwg.org/.

Can you help me understand what does this warning mean? and how to go about solving it?


#2

Firebase uses web sockets for realtime updates but sometimes when the socket connection to the server disconnects/ is terminated for some reason, firebase falls back to long polling, which basically means, it will keep making http requests every few seconds to check for realtime updates. This warning is most likely because of firebase falling back to long polling. Dont worry, It is not an issue. Most likely, you would have seen this message when transitioning to another page or exiting a page cuz the firebase connection will get reset. Hope that helped to clear things up. Cheers!