How to automatically reload the page on server restart

I have a liveview page.
If an error occurs, it will display there. However, when I fix the error and restart the server, the error page still remains there because nothing lets the client know it should reload.
I would like to do this automatically and not by hitting F5

I believe I should send a redirect, however I am not sure where to get the socket from. Any tips?