A
A
Alexander2022-02-21 16:18:55
AJAX
Alexander, 2022-02-21 16:18:55

How to implement non-blocking AJAX?

There is a picture on the page that is loaded from a php script, which in turn receives the mjpeg stream from the camera and constantly gives it to the client. If I run an AJAX request on the page, it will hang in the pending status until I close the picture.
Are there any options to implement parallel operation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2022-02-21
@Rsa97

We need to look at what exactly is causing the blocking. Most often, this is a session file that is opened at the beginning of each script. In this case, you need to add its forced closing (session_write_close) immediately after receiving the necessary session data.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question