I see gmail and facebook are loading incredibly fast and smooth, I rarely,actually not, see image rendering and broken assembling layout. How could i do that ?
that partly has to do with the speed of the server, but also how you setup your pages. you could put everything inside a div that's (html style=) offset -2000px left, the desired end width and height, and has display:none set. then in javascript on pageload, set it's display to 'block' and after that the style.left to a value just above 0. what that should do is draw the page while it's 2000px off the screen, and then that rendered screenbit gets moved (fast) to where it needs to be.
Yea display none on all divs and then add a loading div .. and have javascript using HTML DOM display:block the div boxes
There is part of it attributed to the order everything in the page loads as well. there's really a lot of variables to consider & it's never as simple as flipping a switch. A good book on the subject.
Well the big reason Google sites are fast are because of how many servers they have, and how good they are. Google has thousands of servers, of course not purely dedicated to GMail , but some are. A good way with PHP would be to use some kind of a caching system, or getting faster hosting
i think it is not only about the server it is about the code it self your html and your dynamic pages should be well coding . using some cache as well will increase the speed of your site loading check the site in my signature it is hosted on shared server and the server are really limited but still load fast and smooth