`title: Preload 与 Prefetch Hint 协作缓存预热``categories: Web 开发/前端/数据管理``keywords: preload,prefetch,link hints,缓存预热,Service Worker``description: 使用 `<link rel="preload/prefetch">` 与 Service Worker 协作实现缓存预热与资源优先级管理,优化首屏与路由切换。`Hint 与 SW 协作页面通过 hint 触发资源获取,SW 拦截写入缓存;根据优先级分类存储。示例<link rel="preload" href="/critical.css" as="style"> <link rel="prefetch" href="/next-route.json" as="fetch">

发表评论 取消回复