Questions tagged [sw-toolbox]
39 questions
0
votes
0 answers
why service worker creating default cache
I am using sw-toolbox to implement service worker. I am creating caches by giving cache name in toolbox.router.get function. but still it is creating a default cache with…

Aditya Chhikara
- 13
- 4
0
votes
3 answers
How to cache everything but content using sw-precache
I'm using sw-precache in a jekyll website to add offline capabilities with the following configuration:
gulp.task('generate-service-worker', function(cb) {
var path = require('path');
var swPrecache = require('sw-precache');
var rootDir =…

Carlos Martinez
- 4,350
- 5
- 32
- 62
0
votes
1 answer
sw-toolbox: POST request not getting cached
I want to cache a POST request for 5 minutes. My POST request entry looks like
toolbox.router.post(/myPostApi/, toolbox.cacheFirst, {
cache: {
name: 'myCache',
maxAgeSeconds: 300
}
});
This is not getting cached. The…

Chirag Mongia
- 545
- 4
- 12
0
votes
1 answer
Progressive webapp with shell cached still not behaving as desired?
I have used Sw-precache in my React app to pre-cache my built assets(i.e vendor.js, app.js and, icons). however, the result is less than desirable. On page reload my app assets are all fetched again(from service worker), but never the less…

jasan
- 11,475
- 22
- 57
- 97
0
votes
1 answer
How do i check that sw-toolbox urlPattern handler strategy is working as designed?
I'm using sw-toolbox with sw-precache at runtime caching option. But when i visit the url and inspect the network in devtools it shows cached from service workers not from network first (as i desire). Maybe I just don't understand how these two libs…

jasan
- 11,475
- 22
- 57
- 97
0
votes
1 answer
Regex in swtoolbox router
I've been trying to use the swtoolbox for service worker. There is the case i want to use the url pattern matching to make network only and cache only.
i'm still stuck to make it work.
Basic usage is working fine.
toolbox.router.get('/index.html',…

Winn Minn Soe
- 341
- 1
- 2
- 4
0
votes
2 answers
How to resolve Dynamic URLs dependencies through Service worker?
Though I am familiar with Sw-precache and Sw-toolbox libraries, Still puzzle on how to cater Dynamic Dependencies while building Progressive Web App using Angular.
I have pre-cached bundle.js, bundle.css and some static templates for my application…

Vivek Pratap Singh
- 9,326
- 5
- 21
- 34
0
votes
1 answer
Best approach of Service Worker with query string version identifier on a heavy cached site
Story
I got a website using traditional browser cache, the site is heavy cached, up to 365 days for static content.
And to purge the cache after new version deployed, I am using a query string of version identifier like: