RealComposer
Performance & Edge

Resource Hints (Preconnect and Prefetch)

Direct Definition

Resource hints are HTML directives such as dns-prefetch, preconnect, and prefetch that tell browsers to resolve, connect, or fetch resources before they are strictly required. For web apps calling multiple API hosts, preconnect can hide DNS and TLS handshake latency behind earlier page work.

Technical Architecture & Deep-Dive

When a single page load triggers calls to an edge gateway, analytics, and a CDN asset host, each new origin pays setup cost on the critical path. Preconnect opens TCP and TLS early so the first fetch starts closer to sending the request line.

Hints must be used carefully: over-prefetching wastes bandwidth and connection limits on mobile. Prefer one preconnect to your primary BFF or gateway, and rely on edge aggregation to reduce the number of distinct API origins a page needs. Native apps manage connection pools explicitly instead of HTML hints.

Key Architectural Benefits

Hides DNS and TLS setup before the first API call on web.
Reduces connection churn when multiple hosts are unavoidable.
Pairs with fewer origins when a BFF consolidates backend calls.
REALCOMPOSER EDGE WORKSPACE

Implement Resource Hints (Preconnect and Prefetch) at the Edge

Deploy lightweight API aggregation, edge caching, and secret injection in minutes without Docker containers or complex servers.

START BUILDING FREE

Frequently Asked Questions

Q:Do resource hints help native mobile apps?

HTML hints apply to WebViews and browsers. Native apps should reuse HTTP client connection pools and warm connections to the primary API host instead.

Related Architecture Concepts

Ready-to-Use Edge Recipes