Skip to content

Commit b267081

Browse files
committed
Add no-cache meta tags to fix caching issues
1 parent 5117455 commit b267081

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/.vuepress/config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ export default defineUserConfig({
1212
title: '我的个人知识库',
1313
description: '数学、代码与衍生品笔记',
1414

15+
// 强制浏览器不缓存 HTML,解决更新不及时的问题
16+
head: [
17+
['meta', { 'http-equiv': 'Pragma', content: 'no-cache' }],
18+
['meta', { 'http-equiv': 'Expires', content: '0' }],
19+
['meta', { 'http-equiv': 'Cache-Control', content: 'no-cache, no-store, must-revalidate' }],
20+
],
21+
1522
bundler: viteBundler(),
1623

1724
theme: defaultTheme({

0 commit comments

Comments
 (0)