GoogleChromeLabs / sw-toolbox

[Deprecated] A collection of service worker tools for offlining runtime requests
https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
Apache License 2.0
3.62k stars 332 forks source link

how can I precache some url with cookie ? #280

Open p2227 opened 6 years ago

p2227 commented 6 years ago
var toolbox = require('sw-toolbox');
var pagePaths = ['/','/xxx','/about','/help']
pagePaths.forEach(page=>toolbox.router.get(page,toolbox.networkFirst));
toolbox.precache(pagePaths);

I want this paths precached with cookie ,I had read the docs and counld not find some options like

toolbox.precache(pagePaths, { credentials:'same-origin' });