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

fetchpriority-attribute

Fungsinya

Skill ini memeriksa bagaimana halaman memberi petunjuk prioritas pemuatan untuk gambar dan resource utamanya. Skill ini cocok untuk developer yang ingin konten utama halamannya muncul lebih cepat.

Kapan dipakai

  • ✓Saat gambar utama di halaman Anda lambat dimuat.
  • ✓Saat halaman Anda mendapat skor buruk pada Largest Contentful Paint.
  • ✓Saat banyak gambar bersaing untuk dimuat di bagian atas halaman.

Link skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/fetchpriority-attribute/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/fetchpriority-attribute/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 memberi tahu browser untuk memuat gambar utama saya lebih dulu?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent menemukan gambar terbesar di atas lipatan dan menyarankan petunjuk prioritas tinggi untuknya. Agent juga dapat menyarankan prioritas lebih rendah untuk gambar yang berada lebih jauh di bawah halaman.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Use fetchpriority to hint resource loading priority

Browsers use internal heuristics to guess resource priority, but they cannot know which image is your LCP candidate. Adding fetchpriority="high" to the LCP image has been shown to reduce LCP by 5–30 % in real-world tests, directly improving Core Web Vitals scores and user-perceived load speed. The attribute costs nothing to add and is the lowest-effort high-impact performance optimisation available today.

Quick Reference

  • Add fetchpriority="high" to the LCP image to accelerate Largest Contentful Paint
  • Add fetchpriority="low" to below-the-fold images that would otherwise compete with critical resources
  • Use fetchpriority="high" on <link rel="preload"> for critical fonts and CSS
  • Avoid marking more than one or two resources as high priority — it defeats the purpose

Check

Check whether the LCP image or hero element has fetchpriority="high" and whether any high-priority preload links are missing the attribute.

Fix

Add fetchpriority="high" to the LCP image element and any preloaded critical resources, and fetchpriority="low" to non-critical below-the-fold images.

Explain

Explain how the browser's resource priority queue works and how fetchpriority hints change loading order to improve LCP.

Code Review

Review the HTML for images above the fold. Flag the LCP candidate if it lacks fetchpriority="high", and flag any carousel or below-fold images that lack fetchpriority="low" (they compete with critical resources).


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

Rule page: https://frontendchecklist.io/rules/performance/fetchpriority-attribute

Pertanyaan umum

Apa fungsi fetchpriority?

Itu adalah atribut HTML yang memberi petunjuk seberapa penting sebuah resource, sehingga browser dapat memuatnya dengan urutan yang lebih baik.

Seberapa besar bantuannya?

Skill mengutip pengujian di dunia nyata dengan peningkatan sekitar 5 sampai 30 persen pada Largest Contentful Paint.

Haruskah setiap gambar berprioritas tinggi?

Tidak. Skill memperingatkan bahwa menandai lebih dari satu atau dua resource sebagai prioritas tinggi membuat tujuannya tidak tercapai.

Detail

Deskripsi asli dari pembuat

Use when optimising Largest Contentful Paint (LCP), reducing render-blocking resource contention, or fine-tuning resource loading order in the critical rendering path.

repo: thedaviddias/Front-End-Checklist

Popularitas

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

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa