Chat Creation Issue: How to Keep the Chat Saved if User Leaves the Page?
Unanswered
Scottish Fold posted this in #help-forum
Scottish FoldOP
Hi! Could someone help me out? I have a feature on my site that lets users create chats. The issue is that when a user sends their first message, a request is sent to the backend to create the chat. But if the user quickly leaves the page and goes to another one, the browser cancels this request. I need a way to prevent the request from being interrupted by the browser when the user navigates away, so the chat still gets created and shows up in the chat list when they return. Any suggestions on the best way to handle this?
4 Replies
I wonder how browser cancels the request, once request hits the backend it can't be interrupted by the browser.
also how can a user navigates that fast after pressing an enter??
also how can a user navigates that fast after pressing an enter??
Sun bear
Once you do a
POST request you cannot cancel it from the browser. Your back end is probably doing something wrong or you aren't fetching the chat in your front end correctly. from the described behaviour we cannot help you much.@Scottish Fold open network inspection tab and then try to reproduce
do you really see requests getting canceled when you navigate?
do you really see requests getting canceled when you navigate?
@Scottish Fold Did you try again?