 |
Setting innerHTML with images in Internet Explorer causes them to load one at a time
[reply]
|
07/02/07 09:36 PM EST posted by JER email web |
|
On one of my sites, I've written code that reloads entire segments of my page via AJAX requests, setting the "innerHTML" property of a div container to the returned HTML block. Due to my extremely slow server, I've noticed that any images in this HTML block load one at a time. Since I return about a hundred very small images, the result is hideous to watch.
Judging by some posts I've found around the 'net, this setting is related to my having the "check for new versions every visit to the page" cache option set in IE.
What strikes me as odd is that I'm not actually using IMG tags in that code block, just DIVS with background images set via a CSS class. Since all DIVs are using the same class, it's the same image file used in all of them. I assumed that this approach would work well with all users' cache settings -- it would load the image once (on the "visit to the page"), then reuse it multiple times for the other elements.
A shiny new donkey to anyone who can help me solve this problem!!!!
For more detail, see here. |
|
|
|
SOLVED!!!
The IE6 flicker / incremental load is no more!!!
try { document.execCommand("BackgroundImageCache", false, true); } catch(err) {}
http://mister-pixel.com/index.php?Content__state=is_that_simple |
|
Note: Only registered ShinyDonkey.com users
can post images. Only administrators can delete images.