Error on page refresh after restart

I’m running a regular web application with a jsp login page that uses the “j_security_check” mechanism to get you to the correct page after login.
When I have a vaadin page open, restart the server and do a refresh in the browser, I get the login page. After I fill in the details and submit, I see 2 requests (plus favicon):

Both have the following response:

for(;;);[{“meta”:{“sessionExpired”:true}}]

The 2nd URL is shown in the browser, and Firefox informs me that the json has a syntax error.
I then use the Back button and I end up where I’m supposed to be.

So. Is this something I will only experience in dev mode, or will I get the same behavior in production?
Can I do anything to avoid this?

Yes / no. Vaadin Flow is a server side framework which stores all important information on the server. If you kill / restart the server while you are on a page, the page receives either in invalid security key or session expire error.

I would suggest to get familiar with SystemMessages and configure them as needed. e.g. setting a proper session expire url