0

I have a page that take too long to respond (more than 10min), the user active this page by submitting a form. The problem is when the user click on submit he needs to wait for a long time to browser release the page, so, is there any way to unblock the browser and let user do another stuff while this page is processing? I am using PHP-7.0 for it and I know thread should be a solution for it, but I can see some references that doesn't recommend use thread + webserver. So I need to request a page assync, but ajax isn't the best choice once I do not have any response until task finish.

current scenario:

  • user opens GET /task.php
  • user POST /task.php
  • wait like 10min
  • /task.php shows up

desired scenario:

  • user opens GET /task.php
  • user POST /task.php
  • redirect too /feedback.php
  • /task.php is running in background
  • You should use ajax for form submission, check this link https://stackoverflow.com/questions/16616250/form-submit-with-ajax-passing-form-data-to-php-without-page-refresh – Vikas Garg Jun 29 '18 at 20:34
  • User submit -> queue task -> redirect user . At the back end, script check any task queued -> script pick up task and process. – frz3993 Jun 29 '18 at 20:34

0 Answers0