Reduced log messages
This commit is contained in:
parent
1f3507ea9e
commit
80264f91b8
@ -319,7 +319,7 @@ export class AnimeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
reloadContent(cached?: boolean) {
|
reloadContent(cached?: boolean) {
|
||||||
console.log("reload content", "/_" + this.app.currentPath)
|
// console.log("reload content", "/_" + this.app.currentPath)
|
||||||
|
|
||||||
let headers = new Headers()
|
let headers = new Headers()
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ self.addEventListener("fetch", async (evt: FetchEvent) => {
|
|||||||
let isAuth = request.url.includes("/auth/") || request.url.includes("/logout")
|
let isAuth = request.url.includes("/auth/") || request.url.includes("/logout")
|
||||||
let ignoreCache = false
|
let ignoreCache = false
|
||||||
|
|
||||||
console.log("fetch:", request.url)
|
// console.log("fetch:", request.url)
|
||||||
|
|
||||||
// Exclude certain URLs from being cached
|
// Exclude certain URLs from being cached
|
||||||
for(let pattern of EXCLUDECACHE.keys()) {
|
for(let pattern of EXCLUDECACHE.keys()) {
|
||||||
@ -139,7 +139,7 @@ self.addEventListener("fetch", async (evt: FetchEvent) => {
|
|||||||
|
|
||||||
// Forced cache response?
|
// Forced cache response?
|
||||||
if(request.headers.get("X-CacheOnly") === "true") {
|
if(request.headers.get("X-CacheOnly") === "true") {
|
||||||
console.log("forced cache response")
|
// console.log("forced cache response")
|
||||||
return evt.waitUntil(fromCache(request))
|
return evt.waitUntil(fromCache(request))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ self.addEventListener("fetch", async (evt: FetchEvent) => {
|
|||||||
|
|
||||||
// Start fetching the request
|
// Start fetching the request
|
||||||
let refresh = fetch(request).then(response => {
|
let refresh = fetch(request).then(response => {
|
||||||
console.log(response)
|
// console.log(response)
|
||||||
let clone = response.clone()
|
let clone = response.clone()
|
||||||
|
|
||||||
// Save the new version of the resource in the cache
|
// Save the new version of the resource in the cache
|
||||||
@ -174,7 +174,7 @@ self.addEventListener("fetch", async (evt: FetchEvent) => {
|
|||||||
|
|
||||||
// Try to serve cache first and fall back to network response
|
// Try to serve cache first and fall back to network response
|
||||||
let networkOrCache = fromCache(request).then(response => {
|
let networkOrCache = fromCache(request).then(response => {
|
||||||
console.log("served from cache:", request.url)
|
// console.log("served from cache:", request.url)
|
||||||
servedETag = response.headers.get("ETag")
|
servedETag = response.headers.get("ETag")
|
||||||
ETAGS.set(request.url, servedETag)
|
ETAGS.set(request.url, servedETag)
|
||||||
return response
|
return response
|
||||||
|
Loading…
Reference in New Issue
Block a user