sw: use network first for index

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/653/head
Varun Patil 2023-05-02 23:37:11 -07:00
parent 749e14fe03
commit fb5d08a554
1 changed files with 9 additions and 1 deletions

View File

@ -23,7 +23,15 @@ registerRoute(
// strip certain headers such as HTTP-Range, which is required
// for proper playback of videos.
const networkOnly = [/^.*\/apps\/memories\/api\/.*/];
const networkOnly = [/^.*\/api\/.*/];
// Use network-first for memories page for initial state such as theming
registerRoute(
({ url }) => url.origin === self.location.origin && url.pathname.endsWith('/apps/memories/'),
new NetworkFirst({
cacheName: 'pages',
})
);
// Cache pages for same-origin requests only
registerRoute(