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

html-resource-hints

できること

このスキルは、ブラウザが見つけるのが遅すぎる重要なファイルがないかをページで確認します。初回表示を速くしたい開発者向けです。

使う場面

  • ✓ウェブフォントが、スタイルシートを読んだ後にようやく見つかるとき。
  • ✓メインのヒーロー画像や重要なスクリプトが、必要より遅く読み込まれるとき。
  • ✓ページが多くのサードパーティのサービスを使い、早期に接続する必要があるとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/html-resource-hints/SKILL.md

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“メインのフォントとヒーロー画像が早く読み込まれるように、preload のヒントを追加してもらえますか。”

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

仕組み

エージェントは、遅く読み込まれる重要なリソースを探し、それらに preload のヒントを提案します。ページの初めに使われるサードパーティのドメインには preconnect を提案します。

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

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

Add resource hints (preload, prefetch, dns-prefetch)

The browser's HTML parser discovers resources sequentially — a font referenced in a CSS file won't be fetched until the CSS is parsed. Resource hints break this dependency chain, allowing the browser to start fetching critical resources in parallel with parsing. A single preload directive for a critical font can eliminate a 100–300ms Flash of Invisible Text.

Quick Reference

  • preload forces immediate download of resources needed by the current page
  • prefetch fetches resources likely needed for the next navigation (low priority)
  • dns-prefetch resolves DNS for third-party origins in advance
  • preconnect does DNS + TCP + TLS for origins you'll connect to soon

Check

Look at this HTML file for late-discovered critical resources — fonts referenced in CSS, hero images, and key scripts. Identify where preload or preconnect hints would help.

Fix

Add appropriate preload hints for critical fonts, images, and scripts. Add preconnect for third-party domains used early in the page.

Explain

Explain each resource hint type (preload, prefetch, preconnect, dns-prefetch), when to use each, and the consequences of misusing them.

Code Review

Review templates, server-rendered HTML, and shared components that output markup related to Add resource hints (preload, prefetch, dns-prefetch). Flag exact elements, attributes, and routes where the rendered HTML violates the rule.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/en/rules/html/html-resource-hints

よくある質問

preload と prefetch の違いは何ですか?

preload は現在のページが今必要とするものを取得し、prefetch は次のページで必要になりそうなものを低い優先度で取得します。

preconnect は何をしますか?

DNS、TCP、TLS を含め、サイトへの接続を早めに開き、後のリクエストを早く始められるようにします。

dns-prefetch とは何ですか?

サードパーティのドメイン名を早めに解決するもので、preconnect より軽い方法です。

詳細

作者による元の説明

Use when reviewing templates, rendered HTML, or shared components related to Add resource hints (preload, prefetch, dns-prefetch). Validate the final browser-facing markup, not just the source framework abstraction.

repo: thedaviddias/Front-End-Checklist

人気

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

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

0

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

コメント

  • …

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

似ているスキル