I ask the user to input some data, after that I redirect him to a ‘result’ website which takes several seconds to load.
I don’t like this, because there is no user feedback telling him, that the server has not crashed and that his result is coming. So I was thinking about showing the user a ‘loading’ website stating ‘please wait’ and then automatically redirect him to the ‘result’ page. The user would see the “please-wait”-website the whole time the other one is loading, as Flask does not serve the site before it is finished with the calculations.
[Attempt to clarify]
One of the pages takes so long, because it waits for a file upload. The other side takes so long because its functions wait for data from a third party api.
How would I do that in Flask?
Flask’s documentation for file uploads includes a section on implementing progress bars for file uploads. Choose one of the many client-side solutions to display the progress of the upload and then redirect once the upload is complete.
For the long-running server side process you have several options:
<meta http-equiv="refresh" content="0; url=/path/to/page3">)