From d9f8da52927157e8640311abfb2fc0e3a3d3a5fe Mon Sep 17 00:00:00 2001 From: openclaw Date: Wed, 25 Mar 2026 11:27:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BC=93=E5=AD=98=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E6=9C=BA=E5=88=B6,=E6=AF=8F=E6=AC=A1=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E5=8A=A0=E8=BD=BD=E6=9C=80=E6=96=B0JSON?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alacarte-novel-website/reader.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/alacarte-novel-website/reader.html b/alacarte-novel-website/reader.html index e035cc4..2135336 100644 --- a/alacarte-novel-website/reader.html +++ b/alacarte-novel-website/reader.html @@ -317,10 +317,15 @@ let chaptersData = []; + // 获取带缓存禁用的时间戳 + function getCacheBuster() { + return `?t=${Date.now()}`; + } + // 加载章节列表 async function loadChaptersIndex() { try { - const response = await fetch('data/chapters.json'); + const response = await fetch('data/chapters.json' + getCacheBuster()); const data = await response.json(); chaptersData = data.chapters; renderSidebar(); @@ -343,7 +348,7 @@ currentChapter = id; try { - const response = await fetch(`data/chapter-${String(id).padStart(2, '0')}.json`); + const response = await fetch(`data/chapter-${String(id).padStart(2, '0')}.json` + getCacheBuster()); const chapter = await response.json(); // 将纯文本转换为HTML(每段包裹

标签)