Backend Engineer at Bleacher Report.
Interested in Computer Science and programming languages, particularly functional languages.
These apps aren’t packaged and deployed through stores, they’re just websites that took all the right vitamins.
{
"name": "My Cool App",
"short_name": "Cool App",
"start_url": ".",
"display": "standalone",
"background_color": "#fff",
"description": "A very cool app for doing cool things",
"icons": [{
"src": "images/homescreen48.png",
"sizes": "48x48",
"type": "image/png"
}],
"related_applications": [{
"platform": "play",
"url": "https://play.google.com/store/apps/details?id=cool_app"
}]
}
self.addEventListener('fetch', function (event) {
event.respondWith(
caches.match(event.request)
.then(function (cachedAsset) {
if (cachedAsset) return cachedAsset;
else {
return fetch(event.request)
.then(function (resp) {
return caches.open('dynamic')
.then(function (cache) {
cache.put(event.request.url, res.clone());
return res;
});
});
}
})
);
});