摘要:
Intead of cache the root floder, we want to cache skeleton instead. Respond to requests for the root page with thepage skeleton from the cache: 阅读全文
摘要:
Learn how to use console.table to render arrays and objects in a tabular format for easy scanning over the values. We'll create some mock data and the 阅读全文
摘要:
Learn to use console.time with console.timeEnd to get accurate timings of operations in javascript. This tool can help with javascript profiling and p 阅读全文
摘要:
When the refersh button is clicked, we need to tell the waiting service worker to replace the current service worker right away. Then we refresh the p 阅读全文
摘要:
In some rare cases, you need to ask user to refresh the browsser to update the version. Maybe because some secrity issues. As we have learnt so far. A 阅读全文
摘要:
So once you modify the code, service worker will auto create a new one and it won't take control over until the previous service work total die(close 阅读全文
摘要:
If you want your application works offline or lie-wifi. You need to use cache. API: Create Caches: Create single cache: Get the cache: When to start c 阅读全文
摘要:
For example, if the url is not match to any API endpoint, we want to return 404 error message. So first thing, we want to send the request to the serv 阅读全文
摘要:
Learn how to user console.count in order to log out how many times a given thing has happened. for(var i = 0; i < 10; i++){ var num = Math.random() * 阅读全文