Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Mar 2005
    Posts
    85
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Page Load order in Firefox

    Hi,

    One of the age old questions of web development - how can I make the background-image of the main body load before other images start loading? Firefox especially likes to load background images last...which is a royal pain in the ***, as the loading looks really ugly. Any ideas on how I can make a background-image load first?
    Last edited by pinkshiro; 09-19-2007 at 06:23 AM.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Can you post a link to your site, so we can see the loading for ourselves?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Regular Coder
    Join Date
    Sep 2007
    Location
    AZ, USA
    Posts
    685
    Thanks
    6
    Thanked 46 Times in 46 Posts
    I found a script that might work. it waits until a user scroll down to an image before loading it. It might not work for your purposes, but you might be able to adapt it, or get someone else to. The script is called Lazy Loader.

    Let me know if this was helplfuL!

  • #4
    Regular Coder
    Join Date
    Sep 2007
    Location
    Raleigh, NC
    Posts
    273
    Thanks
    7
    Thanked 59 Times in 52 Posts
    Just out of curiosity how big is your page weight? Most modern connections have no problem spitting a page out, so page order should be inconsequential--if you have a cable connection and load order is distracting, you should probably look at optimizing some of your graphics for filesize.

  • #5
    New Coder
    Join Date
    Oct 2007
    Posts
    22
    Thanks
    0
    Thanked 4 Times in 4 Posts
    just insure the background is set first in the css and the css is included in the head.

    other thing you may try is to apply the background with javascript and show the other content after loading the bg... If you need help for the js ask

  • #6
    New Coder
    Join Date
    Mar 2005
    Posts
    85
    Thanks
    3
    Thanked 0 Times in 0 Posts
    dragging up a semi old thread.

    Thanks for the replies guys. I got pulled away from this site hence didn't have time to follow up on firefox loading issues. I've finally come back to another site were developing, which loads a bit fugly in firefox. Take a look:

    http://dev.digitalgenus.com/cod4/index.html

    Maybe i'm being too picky. On my home dsl connection, loading takes all of 3-5 seconds. But it seems strange to me that you cannot control which files firefox downloads first....in IE, you can force it to load a css background-image by putting it into a "display:none" div at the start of the html document...this puts the required image much higher in the page load order.

    It's not a make or break deal, but it would be nice to have the page loading look a little nicer by displaying the background-image to the wrapping div display first.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •