Cache-bust data.json fetch with timestamp

This commit is contained in:
caoxiaoqi
2026-08-31 15:04:04 +08:00
parent 2bc0dca2df
commit 3fa368f767
+1 -1
View File
@@ -63,7 +63,7 @@ tr:hover td { background: #f5f9ff; }
<p class="footer" id="foot"></p> <p class="footer" id="foot"></p>
</div> </div>
<script> <script>
fetch('data.json').then(r=>r.json()).then(({meta, daily})=>{ fetch('data.json?t='+Date.now()).then(r=>r.json()).then(({meta, daily})=>{
const valid = daily.filter(d=>d.install>0); const valid = daily.filter(d=>d.install>0);
const totalInstall = valid.reduce((s,d)=>s+d.install,0); const totalInstall = valid.reduce((s,d)=>s+d.install,0);
const totalSpend = valid.reduce((s,d)=>s+d.payable_spend,0); const totalSpend = valid.reduce((s,d)=>s+d.payable_spend,0);