Langsung ke konten
Skillpedia
Website & UI (frontend)75k Β· #2871

html-resource-hints

Fungsinya

Skill ini memeriksa halaman untuk file penting yang ditemukan browser terlambat. Skill ini cocok untuk developer yang ingin tampilan pertama situsnya lebih cepat.

Kapan dipakai

  • βœ“Saat font web baru ditemukan setelah lembar gaya dibaca.
  • βœ“Saat gambar utama atau script penting dimuat lebih lambat dari seharusnya.
  • βœ“Saat halaman Anda memakai banyak layanan pihak ketiga yang membutuhkan koneksi awal.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/html-resource-hints/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBisakah Anda menambahkan petunjuk preload agar font utama dan gambar utama saya dimuat lebih cepat?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mencari resource kritis yang dimuat terlambat dan menyarankan petunjuk preload untuknya. Agent juga menyarankan preconnect untuk domain pihak ketiga yang dipakai di awal halaman.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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

Pertanyaan umum

Apa beda preload dan prefetch?

Preload mengambil apa yang dibutuhkan halaman saat ini sekarang juga. Prefetch mengambil apa yang kemungkinan dibutuhkan halaman berikutnya, dengan prioritas rendah.

Apa fungsi preconnect?

Ini membuka koneksi ke situs lebih awal, mencakup DNS, TCP, dan TLS, sehingga permintaan berikutnya dimulai lebih cepat.

Apa itu dns-prefetch?

Ini menyelesaikan nama domain pihak ketiga lebih awal. Opsi ini lebih ringan daripada preconnect.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
75k
Peringkat
#2871
Lisensi
MIT
Diperbarui
31/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa