There is no general rule. In writing ABM, I've searched for a good balance when to do it. ws.flush means doing a round-trip to from your server to your browser, so you have to be careful not to do it to frequent.
e.g.
When adding (injecting) multiple html controls, I ws.flush after I've added all of them and not after each of them.
When running some javascript, I do it immediately
When filling a table, I do it in a batch (e.g. after having added every 50 rows)
The reason for that last one is because a WebSocket message has a limit to its size. e.g. adding all 1000 rows in one batch would probably cause a maxsize exceeded error.
What you want is for the user to have the best/fastest experience possible.
I don't know how your RedirectTo looks like, but it probably is some javascript your run like ws.Eval("window.location = arguments[0]", Array As Object(TargetUrl))
In that case I would do the ws.flush immediately after the eval.
Alwaysbusy