How do i check that sw-toolbox urlPattern handler strategy is working as designed?

288 Views Asked by At

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 work together. My current implementation uses sw-precache to cache my entire webapp(very small webapp) and using runtime caching option i used a url pattern with handler of network first. My thought is that even-though the entire app is cached , when i go the specific url pattern the data used at the page will be fetched from network not cache. Is this incorrect?

1

There are 1 best solutions below

0
On

Yes your dynamic data will come from the network. You should only cache the application shell for best performance.