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


DNS Server

How to solve DNS Server not responding Errors

DNS Server not responding is a common type of error faced by many people on regular basis. There are varieties of reasons causing this...

How to solve 500 Internal Server Error

The 500 Internal Server Error is an HTTP status code displayed when websites have a problem in their code. A website is not a...
do not track

Managing Do Not Track Settings in browsers

People want to have their own privacy. Any kind of information is available on the internet. Searching for information without being noticed is a...
Free Up Hard Disk Space

4 Ways To Free Up Hard Disk Space On Windows

Nowadays the hard drives are getting bigger in the means of storage space. And in one way or the other somehow it gets filled...
Fix Driver Being Installed

How to Fix “The Driver Being Installed Is Not Validated For This Computer”

Most of the computers out there are run by Intel. And most of the time you might have faced some problems will the drivers....
CMOS Battery

How to Clear Your Computer’s CMOS Memory to Reset BIOS Settings

Full form of CMOS is Complementary metal-oxide-semiconductor. It is a small amount of memory located on the motherboard. It saves BIOS settings. Clearing the...
browser cookies

How Do Browser Cookies Work And Should You Be Really Worried About Them

Often when you are browsing through the websites you might have come across the word 'Cookies'. These are called browser cookies and not the...
new android smartphone

How To Set Up Your New Android Smartphone Easily

Whenever you buy a new Android smartphone you want to use it instantly. But you can’t use it because you have to set up...
spot a fake website

Tips and Tricks To Spot A Fake Website From A Real One

The Internet is a convenient way in connecting with the world. Whether it may be through Social Media or some other things. At the...
multiple program installer

Use this Multiple Program Installer For Installing Software

Isn’t it a hectic job to install multiple softwares in our computer? And its a Yes,  it will take a lot of time in...

Follow us to stay updated