JavaScript console.log causes error: “Synchronous XMLHttpRequest on the main thread is deprecated…”

后端 未结 21 2131
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 09:26

I have been adding logs to the console to check the status of different variables without using the Firefox debugger.

However, in many places in which I add a

21条回答
  •  旧巷少年郎
    2020-11-22 09:51

    For me, the problem was that in an OK request, I expected the ajax response to be a well formatted HTML string such as a table, but in this case, the server was experiencing a problem with the request, redirecting to an error page, and was therefore returning back the HTML code of the error page (which had a tag somewhere. I console logged the ajax response and that's when I realized it was not what I was expecting, then proceeded to do my debugging.

提交回复
热议问题