App Startup

Table of Contents


Introduction

The app file layout in the source is as follows:

The build process copies the entire structure to the build area. However, the buildStamp directory is changed to a numeric timestamp of the form 'YYYYMMDDhhmmss'. It also changes any instance of 'buildStamp' in a pathname within index.html to the timestamp. This locks the pathname of all resources to the index.html, preventing any caching between the client and server from providing a stale copy.

index.html

The application starts with the index.html file in the application root. This does the following things:

In addition, the index.html contains a list of all the static file resources for the app (a file manifest). The manifest is automatically generated by the build procedure. The service worker uses the manifest to prefetch all app resources and load them in the application cache for offline use. This procedure ensures that the index.html file and the manifest are not out of sync. The file manifest should not be confused with the manifest.js file, which is the PWA manifest.

app.js

The app.js file does the following:

The remainder of the app is loaded on demand.