jquery load or json with html structure in js

367 Views Asked by At

im trying to create functionality like facebook, where things just run from ajax, no need to reload site again. anyway i want to know how facebook does it, so i can do it like them, they are very fast at it.

do they use jQuery('#phto_area').load('#photo_with_comment); or

do they first get the data in json format and then implement html code on it, which i dought they do this way.

1

There are 1 best solutions below

0
On BEST ANSWER

Facebook has a quite complex architeture based on open source stack. They have released all the code of the modification for the open source program that they patched, and the new servers that they have modified.

To reply to you question, the stream the page to you and heavily rely on ajax call. The best link that gives you an insight is this: http://www.facebook.com/notes/facebook-engineering/bigpipe-pipelining-web-pages-for-high-performance/389414033919

I'll suggest you to subscribe to his Facebook Enginering Page, that gives you an insight in the internals of FB.

Check here for the modification and open source programs that they have released: http://developers.facebook.com/opensource/