2

I want to active PWA I success to cache all assets but configuration JSON not caching so my app didn't work correctly in offline mode

FYI: I try this in real server with https but the same results so I work in virtual server "ngsw.json"

"dataGroups": [
{
  "name": "data",
  "patterns": [
    "https:\\/\\/devtst01\\.dd\\/mazservice\\/AbpUserConfiguration\\/.*",
    "https:\\/\\/devtst01\\.dd\\/mazservice\\/(?:.+\\/)?.*"
  ],
  "strategy": "performance",
  "maxSize": 8,
  "maxAge": 86400000,
  "timeoutMs": 10000,
  "version": 1
}]
  • mainfest screen enter image description here

  • service worker screen enter image description here

  • this is my chrome audites enter image description here

  • this snap from the network in offline mode enter image description here

thanks in advance

Community
  • 1
  • 1
Albaz
  • 905
  • 12
  • 21
  • Your setup seems correct as SW is correctly installed. If you write the whole target url (without regex) does it cache the response? Also note that the last path segment of the url cannot have a "." (dot), as it would be considered as file extension. I wrote a step by step guide about Angular PWAs: https://dev.to/paco_ita/create-progressive-web-apps-with-angular-workbox-pwa-builder-step-4-27d#angular if you want to have a look at it. – Francesco Oct 01 '19 at 12:08

0 Answers0