Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Http2Serverpush Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Performance roadmap / Core Web Vitals workstream. This package is a reference implementation of a declarative asset-hint layer: route in, prioritized asset list out, header emitted by middleware. That pattern is still the right shape for LCP work — only the transport (PUSH) is dead. Treat it as scaffolding for Link: rel=preload, rel=preconnect, rel=prefetch, and 103 Early Hints.
  • Build vs. buy. The scope is genuinely trivial (~one middleware, one config file, MIT). Buying is fine; so is an afternoon of build. The real decision isn't cost, it's ownership: this package is unmaintained (last release June 2021, Laravel 5 only, zero dependents), so "buy" effectively means "fork and own."
  • Legacy estate triage. For any Laravel 5.x app still in production and still serving over a server that honors push, this is a cheap, reversible experiment. For a Laravel 9/10/11 app, it's out of scope on compatibility alone — do not spend a migration on it.
  • Feature-level use cases worth evaluating: marketing landing pages and PDPs with a fixed critical-asset set, checkout flows where every round trip is measurable revenue, and authenticated dashboards with heavy JS bundles. These are the pages where the hint pattern (not the push) still pays.
  • Edge/CDN strategy. The decision this package surfaces is "who owns asset hints — application middleware or the edge?" Modern answer is usually the edge (CDN early hints, Link header injection) or the framework itself. This package argues for app-level ownership; that argument is worth having once, explicitly.
  • Verdict: do not adopt as a dependency. Do mine it for the config-driven per-route hint model, then reimplement ~50 lines of middleware emitting preload hints, or push the hints at the CDN. Fund a measurement spike (RUM LCP/TTFB before/after), not a feature.

When to Consider This Package

Consider it only when all of the following hold:

  • You are running Laravel 5.x and are not migrating in the next two quarters — the package targets Laravel 5 middleware contracts and will not drop into 9/10/11 cleanly.
  • Your TLS-terminating layer actually implements HTTP/2 PUSH: nginx below 1.25.1 with 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.
  • You have a stable, small, route-scoped critical asset list and can afford to hand-maintain it in config. Push punishes staleness — a pushed asset the browser already has is pure wasted bandwidth.
  • Your traffic mix is dominated by clients that honor push. Realistically this is a shrinking slice: Chrome removed HTTP/2 Server Push in 2022 (v106), Firefox disabled it, Safari never shipped it, and HTTP/3 has no push at all. Expect near-zero benefit on modern browsers.

Look elsewhere when:

  • You are on Laravel 9+ — write the middleware yourself or use symfony/web-link style abstractions.
  • Your goal is faster LCP, not push specifically — use rel=preload for the hero asset, 103 Early Hints at the edge, and preconnect for third parties. Same intent, real support.
  • You need active maintenance, security review, or framework-version guarantees — none are available here; there is no release cadence and no dependents to lean on.
  • You want hint management to be observable and testable — you'll need to build logging/assertions regardless; at that point you own the code anyway.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager