Download the PHP package tomkeyte/laravel-http2-push without Composer

On this page you can find all versions of the php package tomkeyte/laravel-http2-push. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-http2-push

A cache-aware HTTP2 Server Push implementation, for the Laravel framework

For a comprehensive study of the impacts of HTTP2 Push, check out this article, courtesy of Merj Ltd

Latest Version on Packagist Total Downloads

HTTP2 Push is hard! This package makes it easy, providing a simple blade directive that informs clients "Hey, I know you've only asked for a HTML document, but I already know you'll need this stylesheet, so just start downloading them now".

Resources are pushed once per cached-lifetime.

i.e, say you have a stylesheet with a cache length set via the Cache-Control header, with an expiry length of 28 days. The package will initially push the resource, and also set a cookie to track (per resource) whether it has been sent, and therefore cached - after all, there's no need to push a resource that the browser has already cached (Hence the motivation behind this package).

Installation

Install the package via composer:

Publish the configuration (recommended):

Server config

IMPORTANT! HTTP2 Push via the Link header must be enabled for your webserver

Instructions for nginx and apache.

Usage

Check the http2push.php config file to set default expiry lengths based on your setup. N.B, expiry lengths throughout the package are expressed in days - a value of -1 indicates no cookie should be set, resulting in a push on all requests.

The setup is as following:

In your blade templates, push the resources:

It is recommended you version your resources, so that the package can track whether it needs to re-push them. This package works well with laravel-mix

* Every GET request that is routed through the web middleware

Testing

Generate a code coverage report with

Requires an applicable code coverage driver, such as xdebug

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-http2-push with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
illuminate/support Version ^6.0|7.0|8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tomkeyte/laravel-http2-push contains the following files

Loading the files please wait ....