Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)75k · #2976

performance-resource-hints

Skill này làm gì

Skill này rà soát một trang và thêm các resource hints đúng cho tài nguyên quan trọng và dịch vụ bên ngoài. Skill dành cho người xây web muốn nội dung chính xuất hiện sớm hơn.

Khi nào nên dùng

  • ✓Khi bạn yêu cầu agent tăng tốc tải phông chữ, ảnh chính hoặc dịch vụ bên thứ ba trên trang.
  • ✓Khi trang của bạn chờ một dịch vụ bên ngoài, như CDN hoặc analytics, trước khi hiện nội dung.
  • ✓Khi bạn muốn báo cho trình duyệt biết các tài nguyên nào có thể cần ở trang tiếp theo.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/performance-resource-hints/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Trang của tôi chờ rất lâu cho phông chữ và một API bên ngoài. Bạn có thể thêm resource hints phù hợp để tăng tốc không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent xem tài nguyên nào quan trọng nhất cho lần hiển thị đầu tiên và thêm preload cho các tệp thiết yếu, preconnect hoặc dns-prefetch cho nguồn bên ngoài, và prefetch cho các trang có thể được mở tiếp theo. Sau đó agent khuyên kiểm tra kết quả trong DevTools hoặc Lighthouse.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Use resource hints for faster loading

Resource hints let the browser start fetching critical assets earlier—improving LCP by 100-300ms on average.

Quick Reference

  • Use preload for critical above-the-fold resources (fonts, hero images)
  • Use preconnect for third-party origins (CDNs, APIs, analytics)
  • Use prefetch for resources likely needed on next navigation
  • Use dns-prefetch as a lightweight alternative to preconnect

Check

Analyze resource hints on this page and verify critical resources use preload/preconnect for optimal loading.

Fix

Add appropriate resource hints (preload, prefetch, preconnect) for critical assets to improve loading performance.

Explain

Explain the differences between preload, prefetch, preconnect, and dns-prefetch and when to use each.

Code Review

Review the routes, assets, and loading behavior that affect Use resource hints for faster loading. 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/en/rules/performance/performance-resource-hints

Câu hỏi thường gặp

Khác nhau giữa preload và prefetch là gì?

Skill nói preload dành cho tài nguyên thiết yếu của trang hiện tại, còn prefetch dành cho tài nguyên có thể cần ở lần điều hướng tiếp theo.

Khi nào nên dùng preconnect?

Skill khuyên dùng cho nguồn bên thứ ba như CDN, API và analytics.

Trang sẽ nhanh hơn bao nhiêu?

Skill nói các gợi ý này có thể cải thiện LCP vài trăm mili giây trung bình, nhưng hiệu quả thật phụ thuộc vào từng trang.

Chi tiết

Mô tả gốc của tác giả

Use when auditing slow page loads, heavy assets, or rendering delays related to Use resource hints for faster loading. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.

repo: thedaviddias/Front-End-Checklist

Độ phổ biến

Sao GitHub
75k
Vị trí xếp hạng
#2976
Giấy phép
MIT
Cập nhật
31/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự