当前位置:网站首页>Uniapp uses PWA
Uniapp uses PWA
2022-07-24 09:56:00 【A sack kitten】
PWA
about PWA There are many definitions of , But in fact, the most popular understanding is that you can send notifications offline , image app The same will h5 Web pages are displayed in the form of icons on the desktop , And you can do something offline , adopt HTTPS Provide , To prevent snooping and ensure that the content is not tampered with web App.
Service Worker
mention pwa I have to mention service worker , Because in use pwa The premise is to register One thread .
service worker yes Service Worker It's a be based on HTML5 API , An independent execution thread , A separate scope , A separate operating environment , Must be in HTTPS Environment to work . Of course, when debugging locally , Use localhost Is not affected by HTTPS Limit .
Use
The author in uniapp Chinese vs pwa In fact, the use of is mainly to h5 Page shortcut to the desktop .
But there is a big problem in the registration process , So record it to avoid further stepping on the pit .
In use , Found a package of others PWA builder, Easy to use , link :pwa builder, It is necessary to introduce , This is for the convenience of passing script introduce , It's simple here. No problem .
Then build manifest.json, introduce , There is an error :
Manifest: Line: 1, column: 1, Syntax error.
Register at service worker when
if ('serviceWorker' in navigator) {
边栏推荐
- IdentityServer4入门
- [STM32 learning] (13) STM32 realizes ultrasonic ranging (hc-sr04)
- Trie tree template 2
- Dynamic programming -- a collection of stock problems
- Ask you to build a small program server
- Raspberry Pie:: no space left on device
- Lung CT segmentation challenge 2017 dataset download and description
- 07 Jason module
- [robot learning] mechanism kinematics analysis and MATLAB simulation (3D model +word report +matlab program)
- 【机器人学习】机构运动学分析与matlab仿真(三维模型+word报告+matlab程序)
猜你喜欢
![[note] what is kernel / user space? Let's start with how the CPU runs the program](/img/b5/0ab4f2841faf3573b4502d2cd09069.png)
[note] what is kernel / user space? Let's start with how the CPU runs the program

Spark Learning: implement compact table command

详解LinkedList

CRC Coding in C language

Implementation principle of acid in MySQL
![[STM32 learning] (7) use of serial port 2 (usart2)](/img/e8/7a01cb2753f448d745e0d8712b3ebc.png)
[STM32 learning] (7) use of serial port 2 (usart2)
![[200 opencv routines] 236. Principal component analysis of feature extraction (openCV)](/img/31/57217a67533d8d37bf86d507996ed7.png)
[200 opencv routines] 236. Principal component analysis of feature extraction (openCV)

07 Jason module

Friends come to interview a unicorn company in Beijing at leisure. The interview question is priced at 25K
![[STM32 learning] (22) STM32 realizes 360 degree rotary encoder](/img/8e/fb036296ec3aff5e60acee5018943c.png)
[STM32 learning] (22) STM32 realizes 360 degree rotary encoder
随机推荐
Selnium checks three conditions when it cannot locate an element
Hucang integrated e-commerce project (I): introduction to the project background and structure
Leetcode skimming: dynamic planning 03 (climb stairs with minimum cost)
[STM32 learning] (5) press the key to control the flow light (interrupt Implementation)
[STM32 learning] (17) STM32 realizes LCD12864 display serial implementation
Raspberry Pie: [failed] failed to start /etc/rc local Compatibility.
PHP Basics - PHP types
Anti shake and throttling
Installation UMI tutorial (error reporting and solutions)
ThreeJs
Detailed explanation of uninstalling MySQL completely under Linux
Exception: pyqtgraph requires Qt version >= 5.12 (your version is 5.9.5)
Basic knowledge of PHP - complete collection of PHP functions
Spark Learning: using RDD API to implement inverted index
Lung CT segmentation challenge 2017 dataset download and description
PHP caching system - PHP uses Memcache
It is reported that the prices of some Intel FPGA chip products have increased by up to 20%
【笔记】什么是内核/用户空间 从CPU如何运行程序讲起
PHP log base - monolog knowledge collation
Ask you to build a small program server