Hi everyone, so cool to have you back here on Dev.
Today I wanted to speak about something that I thought and never tried to test in a real app.
Let's say I am answering an email. I opened my web app and log to Gmail for example.
My network is fine, I type my answer and while the time goes by I am having a network failure. The app did not warned me, and I press "send".
In one hand, the classic way is to catch the 500 and inform the user nothing can go on for the moment.
Gmail in another hand is putting the request in queue and will send the email as soon as possible.
What do you think about it?
Is there a good way to handle network fluctuations while sending requests to the server, so the user have the best experience possible?
What about queueing requests in the browser cache, and sending them as soon as the network is ok?
Do you think retry strategies, like n retry then fail would fit client-to-server architecture?
Make better choices about your code and your career.