Why does $.getJSON() block the browser?

前端 未结 4 958
情书的邮戳
情书的邮戳 2021-02-07 22:11

I have a page where I list hardware devices we monitor for customers. Each row displayed also shows the status of the device i.e. whether it\'s running, paused, starting up etc.

4条回答
  •  既然无缘
    2021-02-07 22:39

    It sounds like getJSON is using asynchronous: false as an option to xhr. It kind of suprises me that jquery would use that as a default though, since that is pretty much always a bad idea for the reasons that you are describing.

    Don't have the time to look into it more at the moment, but that is the first path I would take.

提交回复
热议问题