小程序其实抄袭了PWA,看起来方便,其实限制在微信的框架内
还是来学习Web应用的未来 - PWA吧
写作计划
- 什么是F.I.R.E
- 理解PWA: 应用外壳(App Shell)架构, Service Worker, 缓存, 离线浏览, 观感
- 缓存: HTTP缓存, Service Worker缓存, Workbox
- 拦截网络请求: Fetch API, Service Worker生命周期
- 观感: 添加到主屏幕, 定制图标, 添加启动页面
- 推送通知: 订阅通知, 发送/接收, 取消订阅
- 有弹性的Web应用: 离线浏览, 现代网站所面临的网络问题lie-fi
- 保持数据同步: 后台同步, 定期同步
- PWA的未来: 流式数据, Web蓝牙, Web分享API, 支付请求API, 硬件访问, 形状检测, VR
- Vue-PWA模板的使用,添加UI(Vuetify.js)
- 后端支持,静态文件访问(Flask)
![](https://img.haomeiwen.com/i3843091/852fca12d2a7daf1.png)
1. 什么是F.I.R.E
https://developers.google.com/web/fundamentals/
令人愉悦的Web应用访问体验:
- Fast
反应迅速。(缓存)
It respond quickly to user interactions with silky smooth animations and no janky scrolling. - Integrated
集成到桌面。(跟原生app一样,可添加到桌面图标)
The user doesn’t have to reach through the browser, it uses the full capabilities of the device to create an experience true to the device. - Reliable
可靠。(离线也能保证愉悦地浏览)
Load instantly and reliably, never showing the downasaur, even in uncertain network conditions. - Engaging
对客户有粘性。(消息推送)
Keeps the user coming back to the app with beautifully designed experiences that look and feel natural.
to be continued...
网友评论