头像

Fetch API

Fetch API 是近年来被提及将要取代 XHR 的技术新标准,是一个 HTML5 的 API。
Fetch 并不是 XHR 的升级版本,而是从一个全新的角度来思考的一种设计。

语法

1
Promise<Response> fetch(input[, init]);

查看更多

应用清单 - PWA

manifest.json 文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
"name": "Rocco's Blog",
"short_name": "Rocco",
"description": "An front-end engineer who loves and pursues simple.",
"start_url": "/index.html",
"theme_color": "#333",
"background_color": "#fff",
"display": "standalone",
"orientation": "portrait",
"icons": [
{
"src": "/images/icons/icon-64.png",
"sizes": "64x64",
"type": "image/png"
},
{
"src": "/images/icons/icon-128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "/images/icons/icon-256.png",
"sizes": "256x256",
"type": "image/png"
}
]
}

查看更多