This article will demonstrate creating a styled Offline page and updating the service worker's cache using an editable copy of the default service worker provided by the WebEssentials.AspNetCore.PWA NuGet package. I will assume you have created a new ASP.NET Core 2.2 Razor Pages project, have successfully installed the WebEssentials.AspNetCore.PWA package and have created an editable copy of the service worker. I won't use Identity or Individual User Accounts.
The WebEssentials.AspNetCore.PWA NuGet package dynamically creates an offline.html file which is displayed when the application is offline, and the resource has not been cached. It has little styling.
I enjoy writing these articles. It often enhances and clarifies my coding. I create research projects
to analyze and compose the articles before I publish them. The projects are the result of
a lot of refactoring and are provided with a MIT license. Registered users can download the
projects from Manage > Assets.