PHPackages                             raeder/craft-http2-server-push-twig - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. raeder/craft-http2-server-push-twig

ActiveCraft-plugin[Templating &amp; Views](/categories/templating)

raeder/craft-http2-server-push-twig
===================================

This plugin provides a convenient way to utilize Server Push via a twig filter

2.0.2(3y ago)02.8kMITPHP

Since Feb 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/RaederDev/http-2-server-push-twig)[ Packagist](https://packagist.org/packages/raeder/craft-http2-server-push-twig)[ RSS](/packages/raeder-craft-http2-server-push-twig/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

HTTP/2 Server Push Twig plugin for Craft CMS 4.x
================================================

[](#http2-server-push-twig-plugin-for-craft-cms-4x)

This plugin provides a convenient way to utilize Server Push via a twig filter

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 4.0.0 or later.

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require raeder/craft-http2-server-push-twig

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for HTTP/2 Server Push Twig.

HTTP/2 Server Push Twig Overview
--------------------------------

[](#http2-server-push-twig-overview)

This plugin adds a twig filter that allows you to send a "Link" header to your web-server to enable HTTP/2 Server Push. You will still have to configure your web-server to interpret the Link header and push the assets.

Using HTTP/2 Server Push Twig
-----------------------------

[](#using-http2-server-push-twig)

You can add any asset that should be included in the Link header like this:

```

```

CSS, JS and image files are supported out of the box. If you want to push another asset type you can pass the type like this:

```

```

A full list of supported types can be found here: It's also possible to mark an asset as crossorigin:

```

```

After your site template was rendered by craft a hook will generate the Header. If you're using Caddy you can find an example on how to configure your server in my blog-post:

Using HTTP/2 Server Push Twig modulepreload
-------------------------------------------

[](#using-http2-server-push-twig-modulepreload)

Module preload headers are an experimental browser feature so tread carefully. To push your module file use the h2module filter:

```

```

Please note that you must add 'type="module"' to your script tag, otherwise Google Chrome will not support import and export features.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~248 days

Recently: every ~310 days

Total

6

Last Release

1413d ago

Major Versions

1.1.0 → 2.0.02022-06-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ee4b57e9786c55f52f99350cae29e241523d6f9da68e4e832ecbb57905d3a6b?d=identicon)[N0ps32](/maintainers/N0ps32)

---

Top Contributors

[![RaederDev](https://avatars.githubusercontent.com/u/8162415?v=4)](https://github.com/RaederDev "RaederDev (8 commits)")

---

Tags

twigcmsCraftcraftcmscraft-pluginhttp-2-server-push

### Embed Badge

![Health badge](/badges/raeder-craft-http2-server-push-twig/health.svg)

```
[![Health](https://phpackages.com/badges/raeder-craft-http2-server-push-twig/health.svg)](https://phpackages.com/packages/raeder-craft-http2-server-push-twig)
```

###  Alternatives

[wbrowar/guide

A CMS Guide for Craft CMS.

6154.5k1](/packages/wbrowar-guide)[jalendport/craft-preparse

A fieldtype that parses Twig when an element is saved and saves the result as plain text.

1086.4k](/packages/jalendport-craft-preparse)[nystudio107/craft-autocomplete

Provides Twig template IDE autocomplete of Craft CMS &amp; plugin variables

44204.4k13](/packages/nystudio107-craft-autocomplete)[viget/craft-classnames

Classnames plugin for Craft CMS

1115.5k1](/packages/viget-craft-classnames)[verbb/footnotes

Adds a footnotes feature to CKEditor fields and Twig templates.

213.3k](/packages/verbb-footnotes)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
