kuangrenxing / bigpipe Goto Github PK
View Code? Open in Web Editor NEWThis project forked from garo/bigpipe
Open BigPipe implementation
Home Page: http://www.juhonkoti.net/2010/10/01/open-bigpipe-javascript-implementation
This project forked from garo/bigpipe
Open BigPipe implementation
Home Page: http://www.juhonkoti.net/2010/10/01/open-bigpipe-javascript-implementation
Open BigPipe implementation =========================== This in an open bigpipe implementation written for IRC-Galleria (http://irc-galleria.net) which is implemented by loosely following facebook implementation describied at http://www.facebook.com/notes/facebook-engineering/bigpipe-pipelining-web-pages-for-high-performance/389414033919 BigPipe allows speeding up page rendering times by loading the page in small parts called pagelets. This allows browser to start rendering the page while the php server is still processing to finish the rest. This transforms the traditional page rendering cycle into following steps: 1) Browser requests the page from server 2) Server quickly renders a page skeleton containing the <head> tags and a body with empty div elements which act as containers to the pagelets. The HTTP connection to the browser stays open as the page is not yet finished. 3) Browser will start downloading the bigpipe.js file and after that it'll start rendering the page 4) The PHP server process is still executing and its building each pagelet at a time. Once a pagelet has been completed it's results are sent to the browser inside a <script>BigPipe.onArrive(...)</script> tag. 5) Browser injects the html code received into the correct place. If the pagelet needs any CSS resources those are also downloaded. 6) After all pagelets have been received the browser starts to load all external javascript files needed by those pagelets. 7) After javascripts are downloaded browser executes all inline javascripts. There's an usage example in example.php. Take a good look on it. The example uses a lot of whitespace padding to saturate web server and browser caches so that the bigpipe loading effect is clearly visible. Of course these paddings are not required in real usage. Files included: - bigpipe.js Main javascript file - h_bigpipe.inc BigPipe class php file - h_pagelet.inc Pagelet class php file - example.php Example showing how to use bigpipe - test.js Support file for example - test2.js Support file for example - README This file - Browser.php Browser detection library by Chris Schuld (http://chrisschuld.com/) - prototype.js Prototypejs.org library - prototypepatch.js Patches for prototype
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.