jacobbennett/laravel-http2serverpush
A Laravel middleware package for HTTP/2 server push. It helps your app send Link preload headers for CSS, JS, and other assets so browsers can fetch them sooner, reducing latency and improving page load performance with minimal setup.
PUSH) is dead. Treat it as scaffolding for Link: rel=preload, rel=preconnect, rel=prefetch, and 103 Early Hints.Link header injection) or the framework itself. This package argues for app-level ownership; that argument is worth having once, explicitly.Consider it only when all of the following hold:
http2_push_preload on, or a CDN that still honors Link: rel=preload as a push signal. Verify this first; if the server ignores the header, the package is a no-op with a maintenance cost.Look elsewhere when:
symfony/web-link style abstractions.rel=preload for the hero asset, 103 Early Hints at the edge, and preconnect for third parties. Same intent, real support.To executives (one paragraph): This is a small, free, MIT-licensed middleware that lets us tell the browser about a page's key scripts, styles, and fonts before it asks for them — a real lever on perceived load speed, especially on checkout and landing pages. Two caveats keep it off the critical path: it only supports our older Laravel 5 apps, and the underlying browser mechanism has been removed from Chrome, Firefox, and never existed in Safari, so the upside is concentrated in legacy traffic and niche CDNs. Recommendation: no adoption, no migration; reuse the design pattern (per-route asset hints) in current code and at the CDN edge, and gate any spend on a two-week measurement spike with before/after LCP data.
To engineering: It's ~one middleware plus a per-route config of assets, emitting Link: <…>; rel=preload; as=… headers that an HTTP/2 server may interpret as pushes. Treat it as an unmaintained reference: last release mid-2021, Laravel 5 only, no dependents, no CI signal we can trust. If we want the behavior, vendor the idea into our own middleware (~50 lines, testable, no supply-chain surface) and emit preload/Early Hints instead of push. Watch the classic failure modes when experimenting: over-pushing bloats the connection, pushing already-cached assets wastes bandwidth, and pushed responses have their own per-connection cache semantics that are easy to get wrong — so instrument with RUM and be ready to turn it off per route.
How can I help you explore Laravel packages today?