Forum Moderators: open

Message Too Old, No Replies

Preloading images in IE 6

Why don't preloaded images load from the cache in IE 6?

         

steve007

6:45 pm on May 16, 2002 (gmt 0)



I am creating a web page that preloads about 12 images. If the user rolls over a html link, the image appears. Simple stuff. But in IE 6, each time you rollover a link, the image doesn't seem to be reloading itself from the cache. This is working on all other browsers for Mac and PC. Just not IE 6.

pageoneresults

7:44 pm on May 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You know, I'm seeing that same issue and my designer and I have been tearing our hair out trying to figure out what is going on.

We've been through every byte of code in the preload script and it appears to be flawless. I'd sure like to see an answer to this one.

I have some remote (3rd events) rollovers that don't occur until you pass your mouse over the buttons. The images for those remote rollovers are not preloading in IE6 and work fine in all other browsers. What's the deal?

P.S. Are you using an ImageReady preload script?

P.S.S. Almost forgot, welcome to the forums!

steve007

7:57 pm on May 16, 2002 (gmt 0)



No, we are using a macromedia dreamweaver script. I am actually on hold right now with Microsoft's support team. I have been waiting for about 25 minutes listening to bad jazz. Hopefully this is worth it. If I find out anything, I will be sure to post it.

Thanks for the welcome.

tedster

12:03 am on May 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've been seeing this in IE6 since first release. I think their code is buggy.

bruce

2:36 am on May 18, 2002 (gmt 0)

10+ Year Member



Definitely buggy on rollovers! Not only that but sometimes it works, other times not...something to do with the javascript preload command not functioning correctly...

A quick and dirty workaround: In an inconspicuous area near the bottom of your page, insert your rollover image but reduce it's size to a 1 x 1 pixel image. It will appear as just a small dot, barely visible if you know it's there, but your rollover will load each time with no delay.

tedster

4:00 am on May 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I run into trouble, and I don't declare a new function for js preload - just the native "new" method, width and height declared:

img1=new Image(width,height)
img1.src="image1.gif"

Still, I get sluggish response onMouseover - even on repeated actions when I KNOW the image is cached.

I keep hoping the IE will fix this, but it seems to be problematic even with the most recent patches - guess they're busy with security fixes.

Interesting that the old HTML trick works better for you, bruce. Makes me wonder what nonsense hides deep in the new code. I'm very reluctant to start hiding freckles in my layout, but as IE6 grows, I may have to.

gph

12:46 pm on May 18, 2002 (gmt 0)

10+ Year Member



This test is not very scientific but here's what I've noticed. If I read a caching rollover from a 3.5 floppy in NN4, NN6, Opera 6, IE6 and FrontPage 2000 (preview) only IE6 and FP00 continually read from the disk when the images are moused over.

Could FP00 have the same bug in preview mode?

ergophobe

8:50 pm on May 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I don't know Front Page, but often preview mode uses the IE core for rendering and I woudl guess this is definitely the case for FP, so it's probably the same bug in the same app, not the same bug in both apps if you know what I mean.

Tom

moonbiter

9:10 pm on May 20, 2002 (gmt 0)

10+ Year Member



Might this be an issue of settings in IE 6? I've only noticed this behavior when Tools > Internet Options > Temporary Internet Files > Settings > "Check for newer versions of stored pages" is set to "Every visit to the page."

Not that I have explored this extensively.

Just my $0.02.

pageoneresults

9:25 pm on May 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Mine is set to automatically. I haven't experimented with the other settings mainly because I want most of the preferences in my browsers to be set at default. Not many will change their browser preferences and I need to make sure that I see what they are seeing.

ergophobe, I'm not experiencing any problems while viewing in FP, only at the browser level.

pageoneresults

2:52 pm on Jul 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I think we discovered our problem with the image preloading script. This has to do with another topic that surfaced and using relative vs. absolute URL's.

We encountered an unusally high number of 404 errors relative to our -over images. After investigating for hours, all evidence led back to the external .js file containing the preload script.

We use ImageReady to slice, dice and generate js and css. ImageReady by default will use paths like images/file.gif. It is assuming that all of your image calls will be from the root level which they usually are not.

After participating in the other thread and finding out that you can use this...

images/file.gif

...which tells the browser to look at the images folder in the present directory. Or you can use this...

/images/file.gif

...which tells the browser to look at the images folder at the root level.

We changed all the file references in the external .js file and have had no image preloading problems since then. You also need to make sure that you change the paths on the image code in your html.

This was a great find as it eliminated other issues we were having when using relative URL's that usually look like this...

../../images/file.gif

keyplyr

9:14 pm on Jul 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



> ...have been waiting for about 25 minutes listening to bad jazz

Oxymoron