Forcing browser to download some components before the other

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

  1. #1
    Hi, i have an issue with my website. The browser is downloading some photos before the other which is making the website look like its broken at the first glance. I heard before that is a way to make sequence for downloading HTML components, but i didn't get to see it. Can anyone help me with this.
    And thanks.
     
    Mizyan, Feb 2, 2011 IP
  2. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Do you have a live url; just to check what exactly is happening and to check the markup/css.
     
    radiant_luv, Feb 2, 2011 IP
  3. Mizyan

    Mizyan Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Unfortunately i cant give a live url but the problem is that i have some pictures used for links and other things, while there is other pictures that is not important to show on in the beginning of loading the web page.
    Also in some pages pictures are loaded before the css and js files which makes the whole page look broken (all pictures divs and others are aligned to left).
    What i want is to force the browser for example to load the css and js files first then the pictures in the header then other pictures.
    Isn't there an attribute to give for html components to give them priority in being downloaded or something like that.
    And thanks in advance
     
    Mizyan, Feb 2, 2011 IP
  4. Mizyan

    Mizyan Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    hi, can anyone answer me please i really need help on this.
     
    Mizyan, Feb 7, 2011 IP
  5. AtSeaDesign

    AtSeaDesign Active Member

    Messages:
    172
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    93
    #5
    lookup lazy loading with javascript.

    The page loads from top to bottom in order. I believe items should load in parallel (except for js. Not 100% sure though) When you say pictures in the header, are you referring to <head> or your header section on your page?

    Another option is to host your js via a CDN. You might also check the size of your images. Use Firebug and check your page load times to see what is loading when and how long its taking.
     
    AtSeaDesign, Feb 7, 2011 IP
  6. Mizyan

    Mizyan Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    When i said header i meant the header section not the <head>
    And 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??
     
    Mizyan, Feb 7, 2011 IP
  7. AtSeaDesign

    AtSeaDesign Active Member

    Messages:
    172
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    93
    #7
    I'm not sure if you can load specific items on a page in the order you want. Maybe someone else can chime in?
     
    AtSeaDesign, Feb 8, 2011 IP