Try to dig in the direction of technology AJAX. On the HTML page, make an AJAX request using JS, let the PHP script on the server give any response. JS on HTML will receive the answer itself and display it on the HTML page.
Thus, you will be 100% aware of the status of the execution of the PHP script. (Well ... at least you will be aware of its implementation).
Now on the previous comments:
And where is max_execution_time
set? Have you set via php.ini or via .htaccess?
The browser has a time limit for waiting for a response from the server. So it's not about these variables. Moreover, the person says that the script is fully executed.
@kirelagin questions like this are rarely relevant for a PHP public :)
In vain do you think so :) ... As a developer, I have already come across this and often come across to this day :)
Maybe it makes sense every 19 minutes to send browsers some HTML comments?
In any case, PHP generates HTML content. If you send the code in 19 minutes, not the fact that it will be seen on the side.
My result is: AJAX to help you :)
PS Googling on ajax.js. You can also do with jQuery.