Download the PHP package wkeller/bigpipe-pipeline without Composer
On this page you can find all versions of the php package wkeller/bigpipe-pipeline. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wkeller/bigpipe-pipeline
More information about wkeller/bigpipe-pipeline
Files in wkeller/bigpipe-pipeline
Package bigpipe-pipeline
Short Description BigPipe: Pipelining web pages for high performance built in PHP.
License GPL-3.0-or-later
Informations about the package bigpipe-pipeline
BigPipe: Pipelining web pages for high performance
Bigpipe is a feature originally created by facebook: BigPipe: Pipelining web pages for high performance. The general idea is to break down web pages into small reusable pieces of functionality called Pagelets and separate them into various stages of execution within web servers and browsers. This enables progressive front-end rendering and results in exceptional front-end performance.
Our library code:
Most web frameworks are based on a request and response pattern, one request arrives, we process the data and output of a model. But before we can issue the model we have to wait until all the data has been received before the model can be processed. When you receive your first batch of data, why not send it directly to the browser so that it can start downloading the required CSS, JavaScript and processing it.
Install via composer (recommended)
Methods to use it:
- addContent() (add content to the some DOM element)
- addCss() (add the CSS no to the head of the page)
- addJS() (add JavaScript file to the footer of the page)
- addJsScript() (add inline JavaScript content)
Some working examples:
Adding static text content:
Adding external file: Possible files to be loaded: PHP, HTML and more.
Adding CSS no head
Adding JavaScript files to the footer of the page:
Adding inline JavaScript content:
Priority:
In BigPipe, JavaScript resource is given lower priority than CSS and page content. Therefore, BigPipe won’t start downloading JavaScript for any pagelet until all pagelets in the page have been displayed.
With that, it's possible to set priority to the Pagelets you are loading. Let's say you'd like to load your footer content as last content:
In this case, footer
will have priority 30
. All the Pagelets bofore this number will be loaded first.
Contribution
Want to contribute to this extension? The quickest way is to open a pull request on GitHub.
Support
If you encounter any problems or bugs, please open an issue on GitHub. Need help setting up or want to customize this extension to meet your business needs? Please open an issue and if we like your idea we will add ad a feature.