Background load first?

Discussion in 'HTML & Website Design' started by wd_2k6, Sep 5, 2006.

  1. #1
    Hi I was wondering if there was any way to make my background load first on my website as the other parts of the page are being displayed before the background! This doesn't look attractive so was wondering if i can make the background.jpg load first?! It is only 90KB so its not a major size?!
    Many thanks in advance for all help!!
     
    wd_2k6, Sep 5, 2006 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    you might want to reconsider your concept of "not a major size". 90kB is a twenty second download on a dialup connection. Even on broadband, there is a noticeable wait for an image of that size.

    A good rule of thumb is to keep your entry page to less than 50kB total.

    cheers,

    gary
     
    kk5st, Sep 5, 2006 IP
  3. wmtips

    wmtips Well-Known Member

    Messages:
    601
    Likes Received:
    70
    Best Answers:
    1
    Trophy Points:
    150
    #3
    Try to insert it into your page right after the <BODY>, substitute "yourBG.jpg" with your background filename:

    
    <div style="visibility: hidden">
    <img src="yourBG.jpg" width="1" height="1" />
    </div>
    
    HTML:
    And I think your background is quite large, you must optimize it for faster loading. Different browsers can download page components in different orders, you can't control this behaviour.
     
    wmtips, Sep 5, 2006 IP
  4. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes sorry it was quite a large file!! I've just chose to use a simple colour background rather than picture, and it loads much faster. Many thanks for your help!!
     
    wd_2k6, Sep 6, 2006 IP