From a7ea0247371fbe480643358359384ad105e57bbf Mon Sep 17 00:00:00 2001 From: wonder Date: Tue, 3 Nov 2026 13:49:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=B7=B3=E8=BD=AC=E8=A2=AB=E6=B5=8F=E8=A7=88=E5=99=A8?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E7=9A=84=E6=97=A7=20301=20=E5=8A=AB=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 旧站点 / → 301 /resume/ 曾被浏览器缓存,普通窗口点击切换入口命中缓存 跳转链(无痕正常)。导航入口改用无缓存历史的 /index.html, 并为 HTML 响应加 Cache-Control: no-cache 防止复发 --- nginx.conf | 3 +++ templates/page.html.hbs | 4 ++-- templates/txt-index.html.hbs | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nginx.conf b/nginx.conf index a24b82a..244de47 100644 --- a/nginx.conf +++ b/nginx.conf @@ -5,6 +5,9 @@ server { root /usr/share/nginx/html; index index.html; + # HTML 不缓存(旧站点 301 曾被浏览器缓存导致跳转异常;同时保证面试官看到最新简历) + add_header Cache-Control "no-cache"; + # 共享静态资源 location /css/ { alias /usr/share/nginx/html/css/; diff --git a/templates/page.html.hbs b/templates/page.html.hbs index 7d26bf0..b1864b0 100644 --- a/templates/page.html.hbs +++ b/templates/page.html.hbs @@ -14,12 +14,12 @@ - ⇄ 切换简历版本 + ⇄ 切换简历版本
{{{headerHtml}}} {{{bodyHtml}}}