//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 }); }); }) ); })

Windows 10

Microsoft is Pushing Edge Browser on its Windows 10 Users

Microsoft is testing a new change to its future version of Windows 10, which will probably irk in using the OS. There are some...
Windows 10

Developer gets Windows 10 on ARM running on Lumia Device

We all know that Microsoft has confirmed about no further development of Windows 10 Mobile and the platform is dead. Irrespective of it, there...

Support for IFTTT and more smart home providers added to Cortana

We all know that Cortana have less skills then other Personal Digital Assistants such as Alexa. But now it is becoming much better.Microsoft recently...

How to Create and Use a Password Reset Disk in Windows 10

One of our most self-irritating vices is to forget the important things at first place. Forgetting a password can be one of the more...

How to Fix ‘MTP USB Device Driver Installation Failed’

If you’re connecting your mobile phone to your computer, and you see a message saying 'MTP USB Device Driver Installation Failed', then it is...

Tips and Tricks for Windows 10 File Explorer to get the most out of...

The previously known Windows Explorer got a new name as File Explorer with the release of Windows 8. But, the recent version, associated with...
Spring Creators Update

Microsoft might call their next Windows 10 release as ‘Spring Creators Update’

Microsoft always announces the names of Windows 10 updates. They do this months before they are released. The Fall Creators Update was announced in...
Windows 10 S

Microsoft to put a permanent hault on the lightweight Windows 10 S as a...

Just after the Microsoft announced Windows 10 S, it was very much clear that this SKU will be going to make the company go...
Polaris

Microsoft’s take on it’s modern OS code-named Polaris

It has been noticed that Microsoft is building a new version of Windows 10, which is codenamed 'Polaris'. It is for traditional PCs where they...
MI 4

Someone installed Windows PE on Xiaomi Mi 4 mobile

Recently there were reports on Windows 10 for ARM on Windows Phone and Lumia 1520. After these news, everyone thought it is the end....

Follow us to stay updated

144FansLike
7FollowersFollow
48FollowersFollow