-1

I keep getting this error "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.o"

but I didn't use any AJAX in my code!! I can't seem to find the problem

  • 2
    "I didn't use any AJAX in my code" — Then you loaded someone else's code which does. What do you expect us to do about it (given how little information about your code you have provided)? – Quentin Feb 14 '17 at 10:55
  • Do you have advertising on your page? Are you using tracking scripts? Usually, external scripts are the culprit in cases like this. – Patrick Hund Feb 14 '17 at 10:55
  • The code is too long and am kinda new to stack overflow, but if I implemented ajax one time does it stick to the code? – Adiga Knocker Feb 14 '17 at 11:07
  • "stick to the code" - what do you mean by this? You will get your reported error message when an ajax request runs in synchronous mode. It's recommended not to use this mode because it tends to lock up the browser, especially on long-running requests, which gives a bad user experience. You need to find the code in your page which might make an ajax request. If you don't understand the code, or at least have an overall understanding of what it does, it's probably not a good idea to use it. – ADyson Feb 14 '17 at 11:29
  • It's a harmless warning due to the way the Firebase Database client creates its initial connection to the back-end servers. See http://stackoverflow.com/questions/32467144/firebase-synchronous-xmlhttprequest-deprecated – Frank van Puffelen Feb 14 '17 at 16:21

1 Answers1

0
  1. Press F12
  2. Click on Network Tab. In the sub-tabs select XHR.
  3. Refresh the page.
  4. If you see any xhr network request going, it means the is an ajax call being made.
  5. In that case you may search for the url in your project to see if you are making that request.
  6. If you are using 3rd party scripts, try disabling each one by one and refreshing the page and find out when did the call stop. That is your script.
  7. Remove that script. Use only 3rd party libraries which are very standard and you know them well.