https://medium.com/javascript-scene/why-native-apps-really-are-doomed-native-apps-are-doomed-pt-2-e035b43170e9
https://developers.google.com/web/fundamentals/getting-started/codelabs/your-first-pwapp/
Google Checklist
https://ppt.baomitu.com/
console.log('hello 1')
setTimeout(function() {
console.log('hello 2')
}, 0)
console.log('hello 3')[main] new
[main] work.postMessage 發送
[worker] onmessage
[worker] postMessage
[main] work.onmessage 收到回傳並處理
self.addEventListener("fetch", event => {
event.respondWith(
caches.open("v1").then(cache =>
cache.match(event.request).then(
response =>
response ||
fetch(event.request).then(response => {
cache.put(event.request, response.clone());
return response;
})
)
)
);
});
https://github.com/addyosmani/critical
<link rel=“preload” href=“/assets/myfont.woff” as=“font”>