-
Notifications
You must be signed in to change notification settings - Fork 388
General Feedback #43
Comments
Very much appreciate the fresh pair of eyes you're providing here, @gauntface. I'm roughly breaking up my response to correspond to each of your high-level points.
|
Regarding:
I understand what its doing and how it achieves it, but I now have a really tight dependency on what the server is doing and my build process which doesn't exist otherwise. I follow the importance but because the caching rules are removed from the user, you can't use cache and update in the background, so yes it becomes super risky. I'd almost rather encourage a package number get bumped for each production build and that get used to update the SW file regardless of whether any of the individual files are updated. Agree with the readability issues of final output. it's generated so little point of optimizing for readability. But does entrench the - it's all sw-precache or nothing vibe of the tool. Cache first I'm totally for, but the library seems to cache only - if it gets a hit, it won't update will it? I'd actually prefer sw-precache used sw-toolbox tbh and that's just so that I wouldn't feel so locked in. I suppose the thing that has rung true in your final comment: "sw-precache gets to control when the SW update cycle kicks in due to changes to the precached resources" I'n my head, thinking of sw-precache as something just for install time only assets, it's perfect. I feel that for most sites, there is plenty of fun to be had in the fetch event. Ultimately, I have concerns that over time, sw-precache will get in the way enough that I can see projects dropping back to custom sw files, where as sw-precache to inject static resources and sw-toolbox to manage extra scenarios / helper methods, sounds much more flexible and understandable (if not more error prone). |
Using
I'd contend that you'd end up with a build process that's more fragile and prone to omitting crucial resources, especially for large projects. And are you going to end up redownloading the entire set of resources each time anything gets deployed to your site? That's a throwback to the bad old days when the Play Store had to redownload the entire APK each time an Android app got updated, vs. the current setup where only changed resources need to be downloaded.
It's all
The only time things get updated is when a change to a local resource is detected as part of the build process, and the updated site + SW gets deployed. The update is handled via the SW lifecycle, and the controlled page can hook into the lifecycle events and display a "something is updated; please refresh" message. There's no need to fire off a network request to check to see if something changed. That's a good thing, no?
I guess my vision for |
I agree with all of the above. The one thing I think we disagree on is what is easiest for the user. I have experience with SW and I struggled with this and when it didn't work I was lost in terms of how to fix it. How would someone new to SW get on with it? 'Extending' it to do things fills me with dread because I don't know what it does in the first place, so how would I extend it? It's ultimately just different approach of how to solve this problem is all. We'll see how things go in future projects. |
That's a great point to focus on—removing the rough edges and making this friendlier for developers new to SW via improved documentation, examples and simplified options is high priority right now. Thanks for putting it through its paces, @gauntface! |
Error: ENOENT: no such file or directory, stat 'server/app-shell.handlebars'
The text was updated successfully, but these errors were encountered: