Skip to content

PWA

一句话解释

PWA (Progressive Web App) 是 web app 那个 uses modern APIs 到 provide native-app-如 experience, 包含 offline support and installability.

用大白话说

A Progressive Web App (PWA) is a web application that uses modern web technologies to deliver an experience similar to a native app. PWAs can be installed on the device home screen, work offline, send push notifications, and access device features — all from web technologies.

A web app qualifies as a PWA when it has: a web app manifest (JSON file with app metadata like name, icons, colors), a registered service worker (for offline support and background features), and is served over HTTPS. The browser then offers to "安装" the app.

PWAs bridge the gap between web and native apps. They are built with HTML, CSS, and JavaScript, but can do things previously only native apps could do. Major companies use PWAs to provide fast, reliable experiences on low-end devices and poor network conditions.

示例

html
<link rel="manifest" href="manifest.json">

<script>
if ("serviceWorker" in navigator) {
  navigator.serviceWorker.register("/sw.js");
}
</script>

链接 web app manifest and registering service 工作者 — two 需求 for PWA.

相关术语

相关资源

相关课程

解读错误信息

用大白话解释常见错误——什么意思、为什么发生、如何修复。

查看错误

← 返回术语表