I am currently facing an issue on my website where users can submit a form using AJAX. The response is displayed in an alert indicating whether the submission was successful or if there were any issues. However, due to the asynchronous nature of this process, if a user navigates to another page before receiving the response, the XMLHttpRequest object used for form submission gets deleted, resulting in the user not getting any feedback on the status of their submitted form.
My question is, is there a way to prevent the XMLHttpRequest object from being deactivated when a user navigates to a different page?
PLEASE NOTE: I am reposting this question because my previous query was flagged as a duplicate, but the solutions provided did not resolve my specific problem. You can find the original question here.