dy-dashboard/vault/知识库/工作指南/训练记录/2026-06-20-优化平台强制刷新速度.md
2026-10-28 11:14:17 +08:00

18 lines
593 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 2026-06-20 优化平台强制刷新速度
**旭东 → OpenClaw:**
> 现在强制刷新比较缓慢,帮我检查一下什么情况
**OpenClaw 响应:**
找到两个慢的原因:
1. `marked.js` 每次硬刷新从 CDN 加载(约 260ms),改为预加载本地版本
2. `chart.js` 也走 CDN,同改为本地版本
3. `app.js` 中动态加载 marked.js 的异步逻辑移除,直接使用页面预加载的版本
优化后:
- 硬刷新不再走 CDN 请求,所有 JS 本地加载
- 减少 ~260ms 的 CDN 网络延迟
- 标记版本号 +1 确保浏览器获取最新文件