SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict ghostme's Avatar
    Join Date
    Feb 2005
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    preloading a background image

    Hello good pple of the forum
    i issue a css rule for my table that will contain the masthead
    thus:
    table.banner{background-image:url(background.gif);background-repeat:no-repeat;}
    Afterwhich i preloaded the background image using javascript thus:
    <script>
    banner=new Array();
    banner[1]=new Image();
    banner[1].src="background.gif";
    </script>
    when i tested this script i didn't notice that the background image got pre loaded pls am i doing anything wrong?

  2. #2
    &#083;itePoint Aficionado JVLB's Avatar
    Join Date
    Jan 2002
    Location
    N 44 56.537' W 123 3.683'
    Posts
    1,127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Pre-loading is only of use for swapping images, so there is no delay between image displays. It does nothing to speed the initial load of an image that is already specified to display.

  3. #3
    SitePoint Addict ghostme's Avatar
    Join Date
    Feb 2005
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ok

    hey thanks alot for the clarification


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
  •