Questions tagged [sw-toolbox]
39 questions
1
vote
1 answer
Service worker Failed to load resource: net::ERR_UNSAFE_REDIRECT
would you please tell me what i did wrong with my service worker installation, i have those errors appear in chrome console (see the image-1).
The script resource is behind a redirect, which is disallowed. …

chebaby
- 7,362
- 50
- 46
1
vote
1 answer
How to Change the default Cache First strategy to network first strategy in sw-precache?
Here is my gulp task :
gulp.task('service-worker', ['clean:sw'], function (cb) {
swPrecache.write(path.join(global.config.offlineRoot, 'sw.js'), {
staticFileGlobs: [
global.config.offlineRoot +…

Sandeep
- 121
- 10
1
vote
1 answer
What is the best approach to precache static resources?
We are trying out sw-precache to allow pre-caching of all static resources. We are just thinking which approach to follow for precaching versioned resources which have MD5 fingerprints in their filename.
First solution could be to using sw-toolbox…

Vivek
- 33
- 4
1
vote
3 answers
Service worker runtime cache
I am creating a progressive web app using service workers and i am using service worker toolbox to cache my content.
Service worker code to cache my content :
toolbox.router.get('/(.)', toolbox.fastest);
toolbox.router.post('/(.)',…

Uday Khatry
- 449
- 1
- 8
- 23
1
vote
0 answers
Caching XHR get calls using Service Worker Toolbox
I am trying to store the results of the XHR get call the site is making so that if there is no internet connection I want the data to be retrieved from the cache/indexedDB . I am using Sw-toolbox within my service worker. The URL i am accessing is…

32teeths
- 1,469
- 1
- 15
- 32
0
votes
2 answers
Progressive Web App not working in offline mode
I enabled PWA for my reactjs application and deployed on my domain (arvind.inzack.com)
As part of testing, we installed the app on Samsung Tab device. Once the application is loaded successfully we disabled the wifi connection and reloaded the…

Asha Datla
- 126
- 1
- 11
0
votes
0 answers
Activate service worker on local DNS
I have a PWA developed in NodeJS and ReactJS. I have used gulp to generate service worker using sw-toolbox. The service worker is working when I compile the app and visit localhost URL but my app is using apache config and I have a DNS route defined…

Aditya
- 362
- 2
- 12
0
votes
0 answers
How do I prevent Asp.NET PWA anti-forgery token being cached?
I have a progressive web application which uses sw-toolbox to manage caching of resources.
The log in page (/user/login?returnurl=xxxx) requires an anti-forgery token, so I configured the sw-toolbox router like this to ensure a cached version of the…

Jimbo
- 22,379
- 42
- 117
- 159
0
votes
1 answer
How does sw-toolbox router rule order/priority work?
In my service worker (which uses sw-toolbox library) I have setup two routes as follows:
toolbox.router.any("/user/*", toolbox.networkOnly);
toolbox.router.any("/user/logout", toolbox.logoutHandler);
I assumed that the second rule which is specific…

Jimbo
- 22,379
- 42
- 117
- 159
0
votes
1 answer
sw-toolbox script evaluation failed
I'm fiddling around with service workers and want to use sw-toolbox which has a way to support express-style routing. However, when I import it with any version of these…

Coco
- 1,550
- 3
- 24
- 43
0
votes
2 answers
PWA [sw-toolbox]: How to cache offline page with all resources?
I have a page which i would like to use as offline fallback.
The problem is, that in this page i have a ~10 of js/css resources and ~20 images.
It's silly to point each one in precache array by hand.
Also, it's hard to maintain - all resource…

arkhamvm
- 619
- 1
- 15
- 29
0
votes
1 answer
How call a JFrame from my Application Window SWT Builder
Here is my code in my ApplicationWindow. I have a widgetSelected happening for a bottom called "Welcome" that I want to open a new window with text, which I already have programmed.
//Welcome was clicked
…

user3514461
- 9
- 1
- 5
0
votes
1 answer
How to cache googleapis.com using sw-precache runtimeCaching
I make use of material icons and roboto font on my site and I've been trying to cache it using sw-precache runtimeCaching API but it doesn't work, I'm not sure if I'm doing it right. I need my service worker to fetch these files from cache. Here's…

HackAfro
- 720
- 1
- 12
- 28
0
votes
1 answer
Refresh page after load on cache-first Service Worker
I'm currently considering adding service workers to a Web app I'm building.
This app is, essentially, a collection manager. You can CRUD items of various types and they are usually tightly linked together (e.g. A hasMany B hasMany C).
sw-toolbox…

Xr.
- 1,410
- 13
- 23
0
votes
1 answer
How to show custom 404 page using sw-toolbox sw-precache libraries for service-worker
I have an SPA which makes various http calls to get content from third party service and show content on the page.
How do I configure /use sw-toolbox and sw-precache libraries, such that if http call fails due to being offline it shows a custom 404…

happy
- 39
- 6