How to ensure important images load first?

This is a discussion on "How to ensure important images load first?" within the Web Page Design section. This forum, and the thread "How to ensure important images load first? are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Nov 9th, 2006, 11:02
Reputable Member
Join Date: Mar 2006
Location: UK
Posts: 102
Thanks: 0
Thanked 0 Times in 0 Posts
How to ensure important images load first?

What is the best way (if any) to ensure the most important image on my site (top banner) loads first?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Nov 9th, 2006, 15:39
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to ensure important images load first?

A browser loads elements in the sequence it comes across them.

If your site's banner seems to be taking its time loading, you should be looking at the size of the image and whether there would be some advantage in slicing into smaller images.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Nov 9th, 2006, 17:29
Reputable Member
Join Date: Mar 2006
Location: UK
Posts: 102
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to ensure important images load first?

Geoff, I thought as much!
You're definitely right about the size of the file and I've thought about slicing it into three seperate images, but don't know how to reassemble in the web page.
Can you point me to any help with that?

thanks
Snappy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Nov 9th, 2006, 22:07
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to ensure important images load first?

Load the three slices into the same div.

Float them all left with no padding or margin and they should butt up against each other.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Nov 10th, 2006, 02:25
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to ensure important images load first?

You can use JavaScript to "preload" the important images. I'm not too sure how functional it would be, though.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Nov 10th, 2006, 14:09
Reputable Member
Join Date: Mar 2006
Location: UK
Posts: 102
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to ensure important images load first?

I had three slices, two side by side and one along the bottom...
The ones side by side are fine but there is a gap between those and the one beneath.
The top two images are 159px high and the bottom one is 41px high.
Can you help?

Code: Select all
#header { width: 798px;  /* Always 2px less than #mainframe */ 
height: 200px; 
position: absolute;  /* DO NOT CHANGE */ 
margin-top: 25px;
top: 0; left: 0;
}
Code: Select all
<div id="header">
<img src="imagesOct/images/banner_Oct06_v2_01.jpg"/><img src="imagesOct/images/banner_Oct06_v2_02.gif"/><img src="imagesOct/images/banner_Oct06_v2_03.jpg"/>
</div>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Nov 10th, 2006, 23:40
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to ensure important images load first?

Need to see the live page to see what you have done.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Nov 11th, 2006, 13:58
Reputable Member
Join Date: Mar 2006
Location: UK
Posts: 102
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to ensure important images load first?

http://www.wildside-creative.co.uk/trust2a.html

It looks fine in IE (mac and PC). The problem only occurs in Firefox (mac and PC)(which makes a change I guess!).

Cheers
Snappy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Nov 13th, 2006, 11:17
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to ensure important images load first?

Just been to your page which looks ok but the top image appears to be all one apart from the logo at the right.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Nov 13th, 2006, 18:40
Reputable Member
Join Date: Mar 2006
Location: UK
Posts: 102
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to ensure important images load first?

That's right, its two side by side and one along the bottom.
Did you look in Firefox?(Its ok in IE) There shouldn't be a gap between the two top images and the one along the bottom.

Snappy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Nov 13th, 2006, 18:46
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: How to ensure important images load first?

I would forget about IE 5 Mac. Oh yeah I so would. Save yourself the headache.
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Nov 13th, 2006, 22:57
Reputable Member
Join Date: Mar 2006
Location: UK
Posts: 102
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to ensure important images load first?

Problem is in Firefox on both Mac and PC. For once IE on my mac is playing ball!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old Nov 14th, 2006, 02:02
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to ensure important images load first?

IE 5 isn't really that bad to work with. Now 4 on the other hand, that's a regular barrel of good times.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old Nov 14th, 2006, 10:30
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to ensure important images load first?

Had another look.

Could not see any css code to tell the images in the header to float left so that they stack up alongside and underneath each other.

Some pointers:
You do not have a charset defined for your page.

Your img tags should end ' />' and not '/>'. Note the space before the forward slash. This is a requirement of xhtml strict.

Your page fails W3C validation on 12 counts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15  
Old Nov 14th, 2006, 20:45
Reputable Member
Join Date: Mar 2006
Location: UK
Posts: 102
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to ensure important images load first?

Right...sorted!
I put the below in the main stylesheet and nothing in the "ieonly" stylesheet
Code: Select all
#header img{
float:left;}
Looks okay now in both Firefox (mac/PC) and IE (PC) and Safari (mac).
Completely wrong in IE on the mac, but I think I'm gonna have to live with that. Or am I? Can I do any more? I'm only flesh and blood afterall!!


Thanks for all of your help. Stay tuned for my next newbie dilemma...
Snappy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16  
Old Nov 14th, 2006, 22:49
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to ensure important images load first?

I really wouldn't beat yourself over the head regarding IE on the Mac. It's a dying breed. IE on the Mac that is.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17  
Old Nov 15th, 2006, 16:14
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: How to ensure important images load first?

IE on the Mac is long dead, even MS doesn't offer it for download any more and it no longer comes bundled with the OS.
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
img, load, order

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forcing JavaScript to load before images? JennyChaos Starting Out 14 Jul 13th, 2007 23:02
how can I ensure that require form fields are filled?? uddin PHP Forum 5 Apr 16th, 2007 13:54
HELP!!! Images won't load IE 6 Lilas Graphics and 3D 1 Dec 23rd, 2005 19:08
Pre-Load Images WiseWizards JavaScript Forum 25 Jul 20th, 2005 17:28


All times are GMT. The time now is 14:09.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved