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

Microsoft

cloud clipboard

RS5 build of Windows 10 now comes with Cloud Clipboard feature

Ever wonder where the data stores when you copy text? Cut or Copy feature requires the data to be stored in certain memory which...

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...

TelefĂłnica, a Spanish phone service introduces Aura. Soon will work with Cortana

The Spanish phone service TelefĂłnica yesterday introduced "Aura" at MWC (Mobile World Congress). Aura is an Intelligence-Powered Digital Assisstant. Reportedly, they are planning to...

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...
Meltdown_Spectre

32 class action lawsuits against Intel related to Meltdown and Spectre Flaws

Currently, Intel is facing a number of lawsuits related to recent Meltdown and Spectre CPU vulnerabilities.These two vulnerabilities were disclosed in the starting of...

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...

Now You Can Get Instagram or Snapchat on Windows PC

This generation spends a lot of time with PC and typing so much. It may be the workplace or school and one needs to...

Follow us to stay updated

144FansLike
7FollowersFollow
48FollowersFollow