fix: data.json 加 cache-busting,避免浏览器缓存旧数据导致链接/鉴权显示错误
This commit is contained in:
+1
-1
@@ -196,7 +196,7 @@ function authPill(a){
|
|||||||
return '<span class="pill ok">公开</span>';
|
return '<span class="pill ok">公开</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch('data.json')
|
fetch('data.json?_=' + Date.now(), {cache: 'no-store'})
|
||||||
.then(function(r){ if(!r.ok) throw new Error('HTTP '+r.status); return r.json(); })
|
.then(function(r){ if(!r.ok) throw new Error('HTTP '+r.status); return r.json(); })
|
||||||
.then(function(d){
|
.then(function(d){
|
||||||
document.getElementById('gen-meta').textContent = '统计时间:' + d.generated_at;
|
document.getElementById('gen-meta').textContent = '统计时间:' + d.generated_at;
|
||||||
|
|||||||
Reference in New Issue
Block a user