本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)75k · #2762

browser-caching

できること

このスキルは、Webサイトが、後の訪問のためにファイルを保存するようブラウザに求める方法を確認します。再訪問を速くしたい開発者向けです。

使う場面

  • ✓再訪問の訪問者が、毎回同じファイルをダウンロードしているとき。
  • ✓画像、スクリプト、スタイルのキャッシュヘッダーを設定しているとき。
  • ✓ページが変わったのに、訪問者に古い内容が表示されているとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/browser-caching/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/browser-caching/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“再訪問する人のために、私のサイトの画像とスクリプトが速く読み込まれるように、キャッシュを設定してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、ハッシュ付きのアセットファイルには長いキャッシュ時間を、HTMLページには再検証を伴う短いキャッシュを設定し、ブラウザがファイルの変更を確認できるようETagを使います。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Enable browser caching

Proper caching eliminates redundant downloads on repeat visits—returning users see near-instant page loads when assets are served from browser cache.

Quick Reference

  • Use immutable caching for hashed assets (1 year max-age)
  • Use short cache + revalidation for HTML pages
  • ETags enable efficient cache validation
  • stale-while-revalidate improves perceived performance

Check

Verify that proper cache headers are set for static resources to enable browser caching.

Fix

Configure appropriate Cache-Control and ETag headers for different resource types.

Explain

Explain how browser caching reduces server requests and improves repeat visit performance.

Code Review

Review the routes, assets, and loading behavior that affect Enable browser caching. 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/browser-caching

よくある質問

ハッシュ付きのファイルには、どのくらいのキャッシュ時間を与えるべきですか?

ハッシュ付きのアセットには、最大1年のimmutableキャッシュを提案しています。

HTMLページはどうですか?

コンテンツが新しいままであるように、再検証を伴う短いキャッシュを提案しています。

ETagとは何ですか?

サーバーがファイルの変更を確認できるように、ブラウザが返す小さな識別子です。

詳細

作者による元の説明

Use when auditing slow page loads, heavy assets, or rendering delays related to Enable browser caching. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#2762
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル