I am currently working with a really very slow API, and in many cases site users have to wait until they run out. For instance. when the contact form is submitted and the information is sent via the API.
Now I wonder how can I speed up the API call, at least for the user? Is everything all right, make an asynchronous AJAX call to a separate PHP file and call the API call from there? If so, what happens if the user closes the page and the API call is still running? He might think that everything has already been sent.
source share