开发者

how to unblock browser when using while loop?

i make an ajax request to a php file that runs a while loop that looks for new data in the database, but i cant give it new data because the browser is blocked while waiting for the new data.

does anyone know ho开发者_如何学编程w to not block the browser?


Sounds like you didn't actually make an Asynchronous-JAX request, but rather a synchronous one.

If you're using a Javascript library, most of them have a boolean flag for whether or not the request should be asynchronous - make sure you're not choosing synchronous by accident.


Ajax is asynchronous. To avoid this kind of issue. It seems you're not doing an Ajax request, but a synchrone request. What is your syntax ? Have you a piece of code to show ?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜