Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Laravel News:
Easily Integrate HTTP/2 Server Push with a Laravel Middleware
Aug 12, 2016 @ 14:48:10

The Laravel News site has a recent post showing you how to integrate HTTP2 support into your Laravel-based application using some simple middleware.

As we all know technology changes fast and if you don’t stop and look around once in awhile, you could miss it. HTTP/2 is one area of our tech stack that I haven’t been keeping up with an honestly knew nothing about it until Laracon where Ben Ramsey gave a talk on the subject.

You can watch his talk here and his slide deck is available from his site to browse through. What amazed me is how easy it seemed to implement by utilizing server push or preload.

They describe this "Link" header process could work if done manually but points out that doing that manually for every asset is very time consuming. To help out they point out two packages that can help make it a bit more automatic. The post briefly shows their use (code example) basing the asset list on the contents of your Elixir configuration.

tagged: laravel middleware http2 push link header package

Link: https://laravel-news.com/2016/08/http2-server-push-middleware/


Trending Topics: