SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast Quark's Avatar
    Join Date
    Sep 2006
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Server roundtrip with backgroundimages ie

    Hi,
    I have a problem with the continues loading of backgroundimages, defined in the stylesheet. Have the following structure
    Code:
    <div id="test" class="main">
          <div class="sub"></div>
    </div>
    Class sub has a background image. When I change the class of "test" in my code, the backgroundimage (from sub) is reloaded.Like

    Code:
    test.className = "main2";
    This causes a roundtrip, and makes my page slow. IE settings have no influence. Does anyone know how to solve this?
    thx

  2. #2
    SitePoint Addict darkwater23's Avatar
    Join Date
    Nov 2005
    Location
    Omaha, NE
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wouldn't have guessed that the "sub" class image would reload. Are you pre-fetching all the images onLoad?

  3. #3
    SitePoint Enthusiast Quark's Avatar
    Join Date
    Sep 2006
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by darkwater23 View Post
    I wouldn't have guessed that the "sub" class image would reload. Are you pre-fetching all the images onLoad?
    No, prefetching. Only the background-images of the children of test are reloaded, when the class (of test) is reset. <img> are not reloaded, neither are other background-images, which are not children of test.


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
  •