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

Gaming

video

EA officially launches FIFA 18 for Xbox, Playstation and PC

As we reported earlier, EA has officially launched the latest edition of FIFA on schedule for Xbox, Playstation, and PC.Powered by Frostbite, FIFA 18...

Forza Motorsport 7: Ultimate Edition is now on sale

A GOOD news for Gamer's out there!!!Forza Motorsport 7: Ultimate Edition is now on sale. Yes your favorite game Forza Motorsport 7 is now on...
video

Official trailer of the new and improved Road Rash is out

If you're a 90s kid then you can recall the game Road Rash which ended in 2000. Now it looks like the game is...
FIFA 18

FIFA 18 is now available for EA Access Members

There are a lot of benefits one can enjoy being an EA Access member like free games from the Vault and added discounts on...

Forza Motorsport 7 Demo is now available on Xbox One and Windows 10

Another cool game is now available for xbox. Forza Motorsport 7 Demo is now available on xbox One and Windows 10. If you want...
PlayerUnknown's Battleground

PlayerUnknown’s Battleground sets a new record for simultaneous players

PlayerUnknown's Battleground is a new game on Steam which has been gaining popularity rapidly. According to the recent data gathered from Steam, the game...

These gamers can run with 4K on Xbox One X!

Microsoft yesterday announced its most awaited, the most powerful console ever on the planet, the Xbox One X . The following games will be...
xbox-1-x

Xbox One X : It’s arrived!

We earlier talked about Project Scorpio leaks and today, Microsoft brought an arsenal of announcements for their E3 press conference, and amongst them was...

A Way Out: Split screen Co-Op is back!

Amongst the various announcements at EA Play, was one huge reveal. The newest apparent combination of 'prison break' and 'uncharted' would be seen in...
eaplay

Read all about EA’s Play 2017; Livestream, Time, News

As E3 2017 is all set to start from next week on June 13, today EA will start its annual Play Event, taking place...

Follow us to stay updated

144FansLike
7FollowersFollow
48FollowersFollow