Asynchronous ajax request locking browser

后端 未结 1 1811
滥情空心
滥情空心 2021-01-24 07:35

This is a simple snippet of code to launch an aynchronous ajax request. The processing time of the request is deliberately long (10 seconds or

1条回答
  •  闹比i
    闹比i (楼主)
    2021-01-24 07:37

    PHP is the cause of the problem here. When you do session_start() the PHP locks the session file so there’s no concurrent writing to this file and gives the running script full access to the session variables ( reading and writing ).

    So you need to call session_write_close() as soon as possible.

    0 讨论(0)
提交回复
热议问题