alexjlockwood / ShapeShifter

SVG icon animation tool for Android, iOS, and the web
https://shapeshifter.design
Apache License 2.0
3.96k stars 200 forks source link

Service worker shouldn't precache app on small screens #205

Open grigs opened 6 years ago

grigs commented 6 years ago

I came across your amazing SVG tool while research PWAs for a book I'm writing. Congrats on such a nice app. I'm also pleased to see the notifications that the app is ready to use offline. Nice example of best practices.

One thing I noticed that you might want to fix is that on small screens, you present a message saying that the app is designed for desktop screens. That's fine. But behind the scenes, all of the assets get downloaded and cached. Storing 3MB on mobile user devices is probably not ideal.

If you have breakpoint size under which you don't show the UI, I recommend adding that as a high-level cut-the-mustard test on whether you start up the app and the associated sw.

Thanks again for the great example of a PWA and the neat tool.

alexjlockwood commented 6 years ago

Thanks for the suggestion! To be honest, I am pretty new to creating web apps, so will have to figure out how to do that! :) I understand how service workers work at a basic level, but most of that code was generated for me by the Angular client tool.

Also, let me know when your book comes out! Would love to check it out.