Skip to content

Emitting from regular route to handle server updates #1835

Discussion options

You must be logged in to vote

A Socket.IO connection cannot be preserved across pages. When you are in the POST route handler the browser is closing the page, and will only display a new page when this route returns a response. Only at this point the browser will make a new Flask-SocketIO connection.

Socket.IO applications are normally single-page apps. You may want to consider submitting your form via a background request, so that your socket connection isn't interrupted.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@santiagoziel
Comment options

@miguelgrinberg
Comment options

Answer selected by santiagoziel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants