//This is the "Offline copy of pages" service worker//Add this below content to your HTML page, or add the js file to your page at the very top to register service worker if (navigator.serviceWorker.controller) { console.log('[PWA Builder] active service worker found, no need to register') } else { //Register the ServiceWorker navigator.serviceWorker.register('pwabuilder-sw.js', { scope: './' }).then(function(reg) { console.log('Service worker has been registered for scope:'+ reg.scope); }); }//This is the "Offline copy of pages" service worker//Install stage sets up the index page (home page) in the cache and opens a new cache self.addEventListener('install', function(event) { var indexPage = new Request('index.html'); event.waitUntil( fetch(indexPage).then(function(response) { return caches.open('pwabuilder-offline').then(function(cache) { console.log('[PWA Builder] Cached index page during Install'+ response.url); return cache.put(indexPage, response); }); })); });//If any fetch fails, it will look for the request in the cache and serve it from there first self.addEventListener('fetch', function(event) { var updateCache = function(request){ return caches.open('pwabuilder-offline').then(function (cache) { return fetch(request).then(function (response) { console.log('[PWA Builder] add page to offline'+response.url) return cache.put(request, response); }); }); };event.waitUntil(updateCache(event.request));event.respondWith( fetch(event.request).catch(function(error) { console.log( '[PWA Builder] Network request Failed. Serving content from cache: ' + error );//Check to see if you have it in the cache //Return response //If not in the cache, then return error page return caches.open('pwabuilder-offline').then(function (cache) { return cache.match(event.request).then(function (matching) { var report = !matching || matching.status == 404?Promise.reject('no-match'): matching; return report }); }); }) ); })

Apple

iPhone in 2018

“2018 iPhones to use Intel Baseband chips exclusively instead of Qualcomm”: KGI

Since iPhone 7 has released, Apple has shared their baseband chips between Qualcomm and Intel. According to reports from KGI, Apple is all set...
instastories

Now Facebook might let you share your Instagram stories to WhatsApp

Recently Facebook allowed its users to share their Facebook Stories to Instagram, now it might let WhatsApp do the same thing.According to reports, Facebook...

Following Microsoft, Apple Plans on Designing One-User-Experience

According to the recent news, Microsoft has introduced the Universal Windows Platform (UWP) with Windows 10. This will provide a common app platform for...

Chinese Company sued Apple for App Store Logo Copyright

Controversies and allegations never left their back when it is ‘Apple’ we are talking about. According to a recent news, Apple and Qualcomm -...
Apple

Geekbench reveals how Apple slows down your iPhone.

It is being claimed of making changes to iOS that deliberately scale down the performance of older iPhone models. It is seen that batteries...

How the Android Gadgets are more popular than iOS?

Technological advancements that took place in the modern era have influenced almost all the walks of our society and our personal life as well....
Microsoft Edge

Microsoft Edge for iOS gets new useful features!

Microsoft brought their all new web browser for Windows 10 to Android and iOS (in Beta) last month as a part of providing their...
iPhone 8

8 things to love about the iPhone 8 and iPhone 8 Plus

Apple's new iPhone 8 and iPhone 8 Plus are now available in the market, and it's time for the company to launch a promotional...
video

Here’s how Microsoft Surface Book 2 compares against Macbook Pro

Microsoft announced the new Surface Book 2 which is the successor of Surface Book launched back in 2015. It was rather not a surprise...
Skype

Microsoft is bringing Cortana to Skype

Back in Build 2016, Microsoft announced that Cortana would be coming to Skype Chats. It looks like the day has finally arrived and Microsoft...

Follow us to stay updated

144FansLike
7FollowersFollow
48FollowersFollow