Past few days while observing few websites with heavy content I found very interesting thing..some websites handle it pretty well…
What I found was that they load the content user is looking for primarily on the website first and let the other content which requires a lot computation deliver slowly..
For example try opening facebook in new browser, that you haven’t opened facebook for a while, so that we can observe without browser cache effect..News feed will be loaded first on page and other stuff like ticker, chat, counting of notifications and messages, etc and even remaining news feeds follow later..
My Questions:
1) What is actually happening here?? Because As per my knowledge web works as a request from client and one response from server with data..
2) How can I manage which parts to load first and start displaying without waiting for other data to be calculated on server..
P.S.
I am currently working on php mainly, and will shift to rails shortly, so I am mainly concerned about answer specific to these languages, if some technology specific part is there.. Anyways all answers are most welcome as someday they will be useful..:)
Facebook is using something they call BigPipe to send parts of the page as they render.