Skip to content

Commit

Permalink
Disable all SW functions for testing network caching
Browse files Browse the repository at this point in the history
  • Loading branch information
RickV85 committed Apr 1, 2024
1 parent 1a30f26 commit f20575f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions public/serviceWorker.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
self.addEventListener("install", () => {
// self.addEventListener("install", () => {
// console.log("sw installed");
});
// });

self.addEventListener("activate", () => {
// self.addEventListener("activate", () => {
// console.log("sw activated");
});
// });

// Added to trigger browser add to home screen pop-up
// Changed to allow network requests in standalone
self.addEventListener('fetch', event => {
event.respondWith(
fetch(event.request)
.catch((err) => {
alert(`An error occurred with the network.
Please try your request again. ${err}`)
})
);
});
// self.addEventListener('fetch', event => {
// event.respondWith(
// fetch(event.request)
// .catch((err) => {
// alert(`An error occurred with the network.
// Please try your request again. ${err}`)
// })
// );
// });

0 comments on commit f20575f

Please sign in to comment.