A
A
Alexey2021-01-13 13:07:07
PHP
Alexey, 2021-01-13 13:07:07

Why does the domain hang in chrome and how to get rid of it when executing a php script?

I don't know how to describe the situation better, but I'll try.

There is domain.ru with authorization and PHPSESSION assignment. On the site, the user inserts a link to the file and it starts to be loaded on the server (using curl). The client computer does not play any role - it only sends a link to the source. This is implemented through a post request with a "loaded" response.

But
when the source gives some glitches or it has a very low download speed, it looks like a white page in the tab with the site loading and waiting for the "loading" message to load.
At this moment, the user cannot (WHY?) open a new tab and work from scratch on another task - it's just that index.php apparently does not connect and is spinning ... It can only be solved by restarting the browser and relogin.

What is the problem and how to solve?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nokimaro, 2021-01-13
@nokimaro

For a general understanding of the problem, I recommend reading Blocking Sessions in PHP
Possible solutions:
1. session_write_close();
2. do not use sessions where they are not needed
3. use the session driver without blocking

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question