Skip to content

Commit

Permalink
Add comments to fetch event handler in sw.js
Browse files Browse the repository at this point in the history
  • Loading branch information
m7medVision committed Jan 23, 2024
1 parent 0832d3f commit 2fb2b9b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions static/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ self.addEventListener('activate', function (event) {
);
});
self.addEventListener('fetch', function (event) {
// TODO: make external resources cache first and the rest network first and if offline use cache if available and if not use fallback
event.respondWith(
caches.match(event.request).then(function (response) {
if (!response) {
Expand Down

0 comments on commit 2fb2b9b

Please sign in to comment.