Create Manifest.json and ServiceWorker.js pages

  • Updated

The Manifest.json and ServiceWorker.js files allow you to write Progressive Web Application (PWA) functionality as customizations. Manifest.json contains metadata about your PWA, and ServiceWorker.js acts as proxy servers that sit between the PWA and the network to allow for effective offline experiences. This article provides the steps for editing these files through the Content Management System (CMS).

Setup

  1. Log in to the Admin Console.
  2. Go to Settings and search for Enable Progressive Web Application.
  3. Toggle to Yes so the managed content is exposed on the storefront.
  4. Click Save.

Edit the files

  1. Go to the Admin Console.
  2. Click View Website.
  3. Toggle Content Editor to On.
  4. Select the desired website from the list of websites.
  5. Go to the Page Tree and select ServiceWorker.js or Manifest.json.
  6. Click the Edit icon to turn on the page editor.
  7. Click Edit on the associated page widget.
  8. Insert the text for the file.
  9. Click Save.

    EditFileContent.png

  10. Click Publish.
  11. Decide whether to publish immediately or sometime in the future. Click Publish.