blob: cb890c3a51a5f8926ad9a2674bde3e59719b64cc [file] [log] [blame]
self.onfetch = function(e) {
if (!/\.txt.*/.test(e.request.url))
return;
e.respondWith(
self.caches.open('ignore-search')
.then(function(cache) {
return cache.add(e.request);
})
.then(function() {
return new Response(e.request.url);
})
);
};