Results 1 to 7 of 7

Thread: To Preload or Not to Preload

  1. #1
    Join Date
    Mar 2007
    Posts
    66
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default To Preload or Not to Preload

    In regards to preloading images. I am seeing several ways to do that and I am also reading here on this forum that it doesn't make any difference if you preload or not.

    Any comments?

  2. #2
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    Hmm.......................................

    Why do you want to preload them?
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

  3. #3
    Join Date
    May 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The olny reason I have ever proloaded images, for an instant rollover effect, and was concerned about what the rollover effect would like to someone on dial up.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    In this case, it's most definitely a good idea to preload images.

    Preloading rarely does any harm; in this case it would do a lot of good, because the images will (or at least could) load before the user causes them to be displayed.

    You might also want to only set up the mouseover (if you're doing it with JS) once the images have loaded. That way, if someone does mouse over the image before the replacement has loaded, they just won't get the mouseover effect, rather than having the original image replaced with a blank "could not load image" box.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    What harms are there?
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  6. #6
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    I probably use a weird method to preload images...

    Code:
    .preload{
    width: 1px;
    height: 1px;
    display: none;}
    HTML Code:
    <img src="ex_hover.jpg" alt="Preload" class="preload" />
    I have that before the instance where the hover image is needed. That way, the hover image begins loading before the before image does.
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Setting the width and height is kind of pointless when you're using display: none.

    A blank alt should be used here since the image provides no information (and will never be seen anyway).

    You're still using XML syntax.

    This is useful if you want to do CSS rollovers. However, if JS is being used preloading images like this is a waste of time and bandwidth for non-JS users, and offers less control.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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