上一页 1 ··· 415 416 417 418 419 420 421 422 423 ··· 492 下一页
摘要: 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 阅读全文
posted @ 2016-05-17 21:14 Zhentiw 阅读(175) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2016-05-17 03:35 Zhentiw 阅读(321) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2016-05-17 02:54 Zhentiw 阅读(475) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2016-05-16 21:19 Zhentiw 阅读(242) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2016-05-16 20:11 Zhentiw 阅读(304) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2016-05-16 16:03 Zhentiw 阅读(215) 评论(0) 推荐(0)
摘要: 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() * 阅读全文
posted @ 2016-05-16 15:37 Zhentiw 阅读(142) 评论(0) 推荐(0)
摘要: Learn about console.assert, which is syntactic sugar for logging an error the console when a given condition is not met. It's useful, but may not do w 阅读全文
posted @ 2016-05-16 15:32 Zhentiw 阅读(148) 评论(0) 推荐(0)
摘要: Organize your log output by grouping your logs into collapsable hierarchies using console.group(). for(var i = 0; i < 100; i++){ var num = Math.random 阅读全文
posted @ 2016-05-16 15:23 Zhentiw 阅读(160) 评论(0) 推荐(0)
摘要: Previously we saw how to Hijacking all the reqest, but this is not useful. So now we want to see how to Hijacking one kind of request. For example we 阅读全文
posted @ 2016-05-16 04:35 Zhentiw 阅读(181) 评论(0) 推荐(0)
上一页 1 ··· 415 416 417 418 419 420 421 422 423 ··· 492 下一页