Skip to main content

HTTP/2 Server Push Headers Builder

Build Link preload headers for HTTP/2 server push. Add your resources, choose types, and get ready-to-paste nginx, Apache, and Caddy config snippets.

✓ nginx, Apache & Caddy snippets ✓ style / script / font / image / fetch ✓ Runs 100% in your browser

Frequently Asked Questions

What is HTTP/2 server push?▼

HTTP/2 server push lets a server proactively send resources (CSS, JS, fonts, images) to the client before the browser even requests them. This eliminates a full round-trip for critical assets that the server knows the browser will need.

What does the Link header do?▼

The Link preload header instructs the browser (and HTTP/2 intermediaries) to begin fetching the resource immediately. Format: </path/to/resource>; rel=preload; as=<type>. The 'as' attribute tells the browser what kind of resource it is so it can apply the correct content security policy and cache behavior.

When should I use crossorigin?▼

Set crossorigin=anonymous for fonts and resources fetched with CORS (cross-origin). If the resource requires credentials, use crossorigin=use-credentials. For same-origin resources like scripts and stylesheets loaded from your own domain, you typically don't need crossorigin.

Does server push work with HTTP/1.1?▼

No. Server push is an HTTP/2-only feature. With HTTP/1.1, the Link preload header still tells the browser to preload the resource eagerly, but no push occurs — the browser will make a normal request for it.

How do I add the Link header in nginx?▼

In your nginx location block, add: add_header Link "</style.css>; rel=preload; as=style"; You can combine multiple resources in one header value by separating them with commas. This tool generates the complete nginx directive for you.

What is the performance impact?▼

Server push reduces time-to-interactive for critical resources by eliminating the browser's discovery phase. However, over-pushing can waste bandwidth if the browser already has the resource cached. Consider using Cache-Digest headers or limiting push to first-visit critical path resources only.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →