当前位置:网站首页>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) {
边栏推荐
- CRC Coding in C language
- Do you really understand the concept of buffer? Take you to uncover the buffer zone~
- TypeError: Object of type ‘int32‘ is not JSON serializable
- Home raiding II (leetcode-213)
- What happens from the input URL to the page load
- Yarn: unable to load file
- [example] v-contextmenu right click menu component
- Spark Learning: compile spark source code in win10
- Arduino serial port information reading and output
- Countdownlatch and join [concurrent programming]
猜你喜欢
![[STM32 learning] (10) stm32f1 general timer realizes pulse counter](/img/42/1f5104f923b1868dda23bcc425fc62.png)
[STM32 learning] (10) stm32f1 general timer realizes pulse counter

Hucang integrated e-commerce project (I): introduction to the project background and structure

Spark Learning: build SQL to meet the specified optimization rules
![Raspberry Pie: [failed] failed to start /etc/rc local Compatibility.](/img/c3/d648cea4e8eef20a221dc034ecfc1d.png)
Raspberry Pie: [failed] failed to start /etc/rc local Compatibility.

Cess test online line! The first decentralized storage network to provide multiple application scenarios

Vscode failed to use SSH Remote Connection (and a collection of other problems)

Where is the bitbucket clone address
![[C language] implementation of three versions of address book small project (including source code)](/img/3b/926001332ec05378de4c35dc28ed55.png)
[C language] implementation of three versions of address book small project (including source code)

It is reported that the prices of some Intel FPGA chip products have increased by up to 20%

Lung CT segmentation challenge 2017 dataset download and description
随机推荐
Build practical product help documents to improve user satisfaction
Mysql8.0 authorized remote login
JS, the return statement used in the for loop should be placed in the function to terminate the loop, similar to the invalid return problem in break & foreach
PHP debugging tool - socketlog installation and usage
Opencv learning Day5
TypeError: Object of type ‘int32‘ is not JSON serializable
[STM32 learning] (12) STM32 realizes LCD1602 simple static reality
Home raiding II (leetcode-213)
PHP Basics - PHP super global variables
Looting (leetcode-198)
[MySQL] - deep understanding of index
Excuse me, what are the financial products with an annual interest rate of 6%
Cyclicbarrier and countdownlatch [concurrent programming]
Knapsack problem of dynamic programming -- three lectures on knapsack (01 knapsack, complete knapsack, multiple knapsack)
Home raiding III (leetcode-337)
What happens from the input URL to the page load
Cess test online line! The first decentralized storage network to provide multiple application scenarios
Hands on deep learning (VII) -- bounding box and anchor box
Synchronized scope "concurrent programming"
Is it safe for Oriental Fortune futures to open an online account, and will it be cheated?