Controlling the loading sequence of page components

Discussion in 'HTML & Website Design' started by Mizyan, Feb 7, 2011.

  1. #1
    Hello, i posted a the same subject with a different title but i got no answers, so i reposted coz i need help with this.
    What i want to do is to control the loading order of images, js files, or css files so that the page would be displayed properly.
    In my page there are some pictures being loaded in the beginning but they are too big - which makes other images wait for a along time for their turn - and they are not necessary to be loaded in the beginning, while there are images that i need them to be loaded before the others.
    same for css files. Sometimes they are loaded late and the page look all corrupted untill they are loaded.
    Can anyone provide a solution for this problem.
     
    Mizyan, Feb 7, 2011 IP
  2. moads

    moads Member

    Messages:
    115
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #2
    Most browsers and web servers load images/scripts from top down. You can possibly open multiple loading connections by using iframes. Is there a page you can show an example of?
     
    moads, Feb 7, 2011 IP
  3. Mizyan

    Mizyan Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I know that that the page is loaded from top to bottom, but is there a way to override this sequence.
    I mean i might need to load some pictures that are below others - in page writing order - and sometimes the page is loaded with the text, list, img tags (without loading the image, but it shows the default image in the browser showing that it is not loaded yet) and other components before loading the css file.
    isn't there a way to make some pictures load first, and neglecting the page writing order??
    and sorry, i cant give a live url
     
    Mizyan, Feb 7, 2011 IP
  4. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #4
    No there is no way to override the browser-specific loading sequences.

    But you could use JavaScript to load the page and display what you want first.
     
    Last edited: Feb 7, 2011
    CSM, Feb 7, 2011 IP
  5. Mizyan

    Mizyan Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks. But can you tell me how to do so with javascript.
     
    Mizyan, Feb 8, 2011 IP