diff --git a/articles/flow/advanced/modifying-the-bootstrap-page.adoc b/articles/flow/advanced/modifying-the-bootstrap-page.adoc index a10611ae7d..95a4d8cc98 100644 --- a/articles/flow/advanced/modifying-the-bootstrap-page.adoc +++ b/articles/flow/advanced/modifying-the-bootstrap-page.adoc @@ -202,6 +202,40 @@ public class AppShell implements AppShellConfigurator { Modifications in [methodname]`AppShellConfigurator.configurePage()` have priority over the equivalent annotations. Annotations don't cover all of the cases that can be achieved when overriding the [methodname]`AppShellConfigurator.configurePage()` method. +==== Forcing a Page Reload After an Invalid Server Response[[vaadin-refresh]] + +If the XHR response can't be parsed as JSON, Vaadin looks for a “Vaadin-Refresh” string anywhere inside the response text. If it's present, Vaadin reloads the page instead of showing an error message. Usually such responses are served by some 3rd party servers and then you need to add the refresh token as a meta tag to the HTML page served by it. + +Sample HTML response with the meta tag + +[source,xml] +---- + + + + + + + Vaadin App + + +

Invalid server response

+ + +---- + +But sometimes due to proxy or firewall timeout, a new session is served for the client, without the client being aware of that. In such cases you need to add the refresh token in Vaadin bootstrap page. + +[source,java] +---- +public class AppShell implements AppShellConfigurator { + + @Override + public void configurePage(AppShellSettings settings) { + settings.addMetaTag("refresh", "Vaadin-Refresh"); + } +} +---- === `IndexHtmlRequestListener` Interface [[IndexHtmlRequestListener-interface]]