在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:JacobBennett/laravel-HTTP2ServerPush开源软件地址:https://github.com/JacobBennett/laravel-HTTP2ServerPush开源编程语言:PHP 100.0%开源软件介绍:Server Push Middleware for Laravel 5Server Push is a HTTP/2 concept which allows the server to speculatively start sending resources to the client. This can potentially speed up initial page load times: the browser doesn't have to parse the HTML page and find out which other resources to load, instead the server can start sending them immediately. (source) This package aims to provide the easiest experience for adding Server Push to your responses.
Simply route your requests through the Requirements
InstallationYou can install the package via composer: $ composer require jacobbennett/laravel-http2serverpush Next you must add the // app/Http/Kernel.php
...
protected $middlewareGroups = [
'web' => [
...
\JacobBennett\Http2ServerPush\Middleware\AddHttp2ServerPush::class,
...
],
...
]; Publish configphp artisan vendor:publish --provider="JacobBennett\Http2ServerPush\ServiceProvider" UsageWhen you route a request through the Note: To push an image asset, it must have one of the following extensions: Testing$ composer test ContributingPlease see CONTRIBUTING for details. SecurityIf you discover any security related issues, please email [email protected] instead of using the issue tracker. CreditsThanks to the https://github.com/spatie/laravel-pjax package for providing a great starting point for testing Middlewares. LicenseThe MIT License (MIT). Please see License File for more information. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论