cdn
它能做什么
这项技能检查网站的静态文件是否通过内容分发网络提供。适合希望全球各地的访客都能更快加载页面的开发者和网站所有者。
适用场景
- ✓当你的网站对离服务器较远的访客加载缓慢时。
- ✓当静态文件只从一个服务器位置提供时。
- ✓当你想防范流量突然激增时。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/cdn/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在我网站的图片和脚本前面设置 CDN,让其他国家的访客能更快加载它们。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会配置 CDN,使静态资源从边缘服务器提供,并设置正确的缓存标头,让每位访客都从附近的位置获取文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Use a content delivery network
A CDN serves static assets from geographically distributed servers—users download from the nearest location, dramatically reducing latency and improving load times.
Quick Reference
- CDNs serve content from edge servers closest to users
- Reduces latency by 50-70% for global users
- Handles traffic spikes and provides DDoS protection
- Popular options: Cloudflare, Vercel, AWS CloudFront, Fastly
Check
Check if static assets are served from a CDN and if the CDN is properly configured.
Fix
Configure a CDN to serve static assets with proper caching headers and geographic distribution.
Explain
Explain how CDNs reduce latency by serving content from geographically distributed servers.
Code Review
Review the routes, assets, and loading behavior that affect Use a content delivery network. Flag exact files, requests, or rendering steps that add unnecessary network, CPU, or layout cost, and describe the measurement method used to confirm the issue.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/performance/cdn
常见问题
这项技能提到了哪些 CDN 服务商?
Cloudflare、Vercel、AWS CloudFront 和 Fastly。
CDN 能防范攻击吗?
这项技能说明,CDN 可以应对流量高峰,并提供 DDoS 防护。
能快多少?
这项技能估计,对全球用户来说,延迟可降低 50% 到 70%。
详情
作者的原始描述
Use when auditing slow page loads, heavy assets, or rendering delays related to Use a content delivery network. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.
热度
- GitHub 星标
- 75k
- 排名
- #2770
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。