How to make web page load smoothly ?

Discussion in 'PHP' started by viron86, Nov 14, 2008.

  1. #1
    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 ?
     
    viron86, Nov 14, 2008 IP
  2. rene7705

    rene7705 Peon

    Messages:
    233
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    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.
     
    rene7705, Nov 14, 2008 IP
  3. atlantaazfinest

    atlantaazfinest Peon

    Messages:
    389
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yea display none on all divs and then add a loading div .. and have javascript using HTML DOM display:block the div boxes
     
    atlantaazfinest, Nov 14, 2008 IP
  4. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #4
    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.
     
    joebert, Nov 14, 2008 IP
  5. Aldo

    Aldo Peon

    Messages:
    99
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    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 :p, but some are.

    A good way with PHP would be to use some kind of a caching system, or getting faster hosting :)
     
    Aldo, Nov 14, 2008 IP
  6. alhelalat

    alhelalat Member

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #6
    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
     
    alhelalat, Nov 15, 2008 IP