What happens if a user leaves the page while its processing via Ajax? Will the processing continue? I use Ajax to display a loading image while it executes a script that could take a long time and am worried if users leave the page, the processing of this script will stop. I want it to contiue whether or not the user is on the page. Is this possible?
Share
I guess if the query is sent to the processing asp/php file and ajax is only waiting for the response, the query is successful.
But I think, you must add a control, like and alert asking if you would like to stay on this page or leave.
What I mean is, try writing a comment or an answer on this page and try to press the back button, an alert will appear.
With this method, you make sure the user doesn’t leave before the query is complete.