PWA Offline Page
Vaadin automatically generates and serves an offline page. This is a simple page that:
-
Includes the application name and icon.
-
Communicates to the user that the application is offline, because there is no network connection.
Creating a Custom Offline Page
To override the default offline page:
-
Create a file named
offline.html
. -
Add the file to your
src/main/webapp/
folder.
You can change the name of the offline page file using the offlinePath
parameter in the @PWA
annotation.
The offline page can only use resources found in the cache. By default, only the offline page, manifest, and icons are cached. If your page needs additional resources (such as CSS, images, Web Components), you can define them using the offlineResources
parameter in the @PWA
annotation. See Defining Custom Cache Resources for more.
53B65327-9EAA-4050-9CF3-718049396BC7