don't cache non-ok server responces

This commit is contained in:
MathMan05 2024-10-31 12:42:54 -05:00
parent 0a8eab2d03
commit fa4e3b18a7

View file

@ -30,6 +30,7 @@ async function checkCache(){
} }
console.log(lastcache); console.log(lastcache);
fetch("/getupdates").then(async data=>{ fetch("/getupdates").then(async data=>{
if(!data.ok) return;
const text = await data.clone().text(); const text = await data.clone().text();
console.log(text, lastcache); console.log(text, lastcache);
if(lastcache !== text){ if(lastcache !== text){