Skip to content

Commit

Permalink
update sw.js
Browse files Browse the repository at this point in the history
  • Loading branch information
guyutongxue committed May 18, 2024
1 parent 84b72bd commit d6109d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const addResourcesToCache = async (resources) => {
*/
const putInCache = async (request, response) => {
const url = new URL(request.url);
if (url.protocol === "chrome-extension:") {
if (url.protocol === "chrome-extension:" || request.method !== "GET") {
return;
}
const cache = await caches.open(CACHE_KEY);
Expand Down

0 comments on commit d6109d9

Please sign in to comment.