[Vaadin 19] Custom offline page is not used when navigating to Java views
See original GitHub issueDescription of the bug / feature
I’ve prepared my custom offline.html page. I’ve put it in 3 places in my project (java + spring app on Vaadin 19):
- src/main/resources/META-INF/resources/ (according to https://vaadin.com/docs-beta/latest/guide/configuration/pwa/#offlinePath)
- even in src/main/webapp/ (because the above didn’t work)
- even in frontend/ (where index.html resides successfully)
Of course I have this @PWA(... , offlinePath = "offline.html")
in my AppShellConfigurator class.
But when I’m testing offline mode (Chrome / Network / Offline ) my custom offline.html page is not show only Vaadin default one is shown:
Expected behavior
I want my custom offline page to be shown. Is this a bug or I’m doing something wrong?
Versions:
- Vaadin / Flow version: Vaadin 19.0.0.beta4
- Java version: 8
- OS version: Win10
- Browser version (if applicable): Chrome
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Fusion: Customizable offline stub for Java views · Issue #277
The user gets the stub when trying to navigate a Java view when offline. It's nice but it has limitations that it's not...
Read more >Recommended Changes | Upgrading | Vaadin Docs
The PageConfigurator interface is deprecated; customize initial page settings instead by overriding AppShellConfigurator::configurePage() .
Read more >PWA Offline Page | Progressive Web Applications - Vaadin
This is a simple page that: Includes the application name and icon. Communicates to the user that the application is offline, because there...
Read more >Vaadin 19 adds offline functionality to Fusion: here's how it ...
Once the application shell and route JavaScript bundles are cached, users can navigate between views in the app offline as well as online....
Read more >App Layout | Components | Vaadin Docs
The layout consists of three sections: a horizontal navigation bar (navbar), a collapsible navigation drawer (drawer) and a content area.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Decided on a solution were the custom offline page is used in both cases (stand-alone and embedded in the app shell protected by an
<iframe>
). So the behavior will be:Offline start:
offlinePath=custom.html
: rendercustom.html
as a single page in browserofflinePath
set: render app shell with the Flow default offline page in iframeOffline navigation:
offlinePath=custom.html
: render appshell withcustom.html
embedded in iframeofflinePath
set: render appshell with the Flow default offline page in iframeCurrently blocked by vaadin/flow#10031
Hi @Haprog I have only java views (no TS, so far). Plus static html page (static and closed - I mean seperated from views, theme, styles) called offline.html. I thought that if I give it to offlinePath my static html page is shown, but no, only vaadin default page is shown, moreover in English of course- it is a problem, cause it should be in Polish 😃
If it was possible to parametrize this default offline page and give your texts it wolud be enough. For example via CustomizedSystemMessages, where I can set my texts for eg. session expiration, or in the same way as I configure reconnect text (via dedicated ReconnectDialogConfiguration class).