当前位置:网站首页>PWA (Progressive Web App)
PWA (Progressive Web App)
2022-07-05 10:44:00 【Code Bruce Lee】
PWA (Progressive Web App)
1、 brief introduction
It's an idea , Use a variety of techniques to enhance web app The function of , Can make the experience of the website better , It can simulate some native functions , such as : Notification push
Js-to-Native And with PWA The first pure web application , Will be squeezed in two directions Hybrid Living space of , Digest current Hybird The architecture mainly solves the problem
IOS Not yet PWA
2、 The next generation web application
2.1 advantage
webpack、Rollup Wait for the packing tool
Babel、PostCSS And other translation tools
TypeScript Etc. can be translated into Javascript Programming language
React、Angular、vue Etc web The front frame
isomorphism Javascript application
2.2 shortcoming
Network delay caused by downloading web resources
web Applications rely on browsers as portals
There is no good offline use scheme
There is no good news notification scheme
3、PWA Advantages and characteristics of
Significantly improve application loading speed
web Applications can be used in offline environments
web Applications can be added to the main screen like native applications
web Applications can initiate push notifications when they are not activated
web The integration ability of application and operating system is further improved
With progressive enhancement , Responsive user interface , Do not rely on network links , Class native application , Continuous updating , Security , Can be found , Revisit , Installable , The characteristics of connectivity
4、Web App Manifest
4.1 Introduce
Expose to the browser through a manifest file web Application metadata , Including the name 、icon Of URL etc. , For browser use , such as : Exposed to the operating system when added to the home screen or push notifications , To enhance web Application and operating system integration capabilities
It's like PWA Your household register is the same , Bearing the web The important task of application and operating system integration , It will continue to develop in the future , To satisfy web The need for high-speed evolution of applications
4.2 manifest.json
{
“short_name”: “Manifest Sample”,
“name”: “Web Application Manifest Sample”,
“icons”: [{
“src”: “launcher-icon-2x.png”,
“sizes”: “96x96”,
“type”: “image/png”
}],
“scope”:“/sample/”, // -> Defined web The browsing scope of the application , For example, those outside the scope of action url Will open the browser instead of in the current PWA Continue browsing in
“start_url”: “/sample/index.html”, // -> Defined a PWA Entry page for
“display”: “standalone”,
“orientation”: “landspace”, // -> Lock screen rotation
“theme_color”: “#000”, // -> Theme color
“background_color”: “#fff” // -> Background color
}
5、Service Worker
5.1 LocalServer
Give Way web The first attempt to use the app offline
Google In order to make web Applications can store data locally and execute offline , Deliberately 07 In, a browser was developed to enhance web application Goole Gears
stay Gears API in , Through to the LocalServer The module submits a list of cache files to realize offline support
5.2 Application Cache
Give Way web The second attempt to use the app offline
stay LocalServer Further development on the basis of
shortcoming : Not programmable , Unable to clean cache , There is almost no routing mechanism
})
7、PWA With native APP The difference of
03.png
8、PWA Yes web APP Influence
Experience level gradually to the original APP close , Available offline , Main screen icon entry , Start animation , Basically, it can be compared with native APP The experience is consistent
The change of development mode ,Web Consider offline mode and experience while developing
App The installation and update mechanism of brings changes to the operation mode ,url Can be up to , Applications can be linked , Not only rely on shopping malls to distribute applications
边栏推荐
- 非技术部门,如何参与 DevOps?
- 基于昇腾AI丨以萨技术推出视频图像全目标结构化解决方案,达到业界领先水平
- 第五届 Polkadot Hackathon 创业大赛全程回顾,获胜项目揭秘!
- 手机厂商“互卷”之年:“机海战术”失灵,“慢节奏”打法崛起
- 微信核酸检测预约小程序系统毕业设计毕设(8)毕业设计论文模板
- PHP solves the problems of cache avalanche, cache penetration and cache breakdown of redis
- SqlServer定时备份数据库和定时杀死数据库死锁解决
- Go project practice - Gorm format time field
- 使用GBase 8c数据库过程中报错:80000502,Cluster:%s is busy,是怎么回事?
- Go项目实战—参数绑定,类型转换
猜你喜欢
2022年化工自动化控制仪表考试试题及在线模拟考试
Blockbuster: the domestic IDE is released, developed by Alibaba, and is completely open source!
WorkManager學習一
Web3基金会「Grant计划」赋能开发者,盘点四大成功项目
DGL中异构图的一些理解以及异构图卷积HeteroGraphConv的用法
How can non-technical departments participate in Devops?
赛克瑞浦动力电池首台产品正式下线
Implement the rising edge in C #, and simulate the PLC environment to verify the difference between if statement using the rising edge and not using the rising edge
Workmanager Learning one
爬虫(9) - Scrapy框架(1) | Scrapy 异步网络爬虫框架
随机推荐
Sqlserver regularly backup database and regularly kill database deadlock solution
使用bat命令一键启动常用浏览器
Qt实现json解析
Taro进阶
beego跨域问题解决方案-亲试成功
基于昇腾AI丨爱笔智能推出银行网点数字化解决方案,实现从总部到网点的信息数字化全覆盖
九度 1480:最大上升子序列和(动态规划思想求最值)
字符串、、
Common functions of go-2-vim IDE
csdn软件测试入门的测试基本流程
Web Components
在C# 中实现上升沿,并模仿PLC环境验证 If 语句使用上升沿和不使用上升沿的不同
Coneroller执行时候的-26374及-26377错误
Use bat command to launch common browsers with one click
Shortcut keys for vscode
web安全
WorkManager學習一
2022年危险化学品生产单位安全生产管理人员特种作业证考试题库模拟考试平台操作
Based on shengteng AI Yisa technology, it launched a full target structured solution for video images, reaching the industry-leading level
Activity enter exit animation