View Full Version : Page Load order in Firefox

09-19-2007, 05:48 AM

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?

09-19-2007, 06:28 AM
Can you post a link to your site, so we can see the loading for ourselves?

10-08-2007, 09:48 PM
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. (http://www.appelsiini.net/projects/lazyload)

Let me know if this was helplfuL!

10-09-2007, 12:01 AM
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.

10-09-2007, 10:07 AM
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

11-04-2007, 09:49 PM
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:


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.