Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Latest commit

 

History

History
23 lines (15 loc) · 1.08 KB

tutorial-pwa-offline.asciidoc

File metadata and controls

23 lines (15 loc) · 1.08 KB
title order layout
PWA Offline Page
6
page

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:

  1. Create a file named offline.html.

  2. 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.