473,324 Members | 2,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

IE 6.0+ refuses to pre-cache images?

Greetings:

I cannot seem to get IE 6.0 to pre-cache my rollover images. Every time the
user rolls over a link, it rereads it from the server, even though it is
well into the cache by that time. It works fine in Netscape, Mozilla,
Firebird, Firefox, etc. Suggestions? (Other than the obvious one regarding
IE :P)

Thanks!

Peace,
Pen

Javascript for the rollover included below.
<head>
<SCRIPT LANGUAGE = "javascript">
<!--

if (document.images) { // Active Images
img1on = new Image();
img1on.src = "images/right_buttoncap_rollover.gif";

img1off = new Image();
img1off.src = "images/right_buttoncap.gif";

img2on = new Image();
img2on.src = "images/right_buttoncap_rollover.gif";

img2off = new Image();
img2off.src = "images/right_buttoncap.gif";

img3on = new Image();
img3on.src = "images/right_buttoncap_rollover.gif";

img3off = new Image();
img3off.src = "images/right_buttoncap.gif";

img4on = new Image();
img4on.src = "images/right_buttoncap_rollover.gif";

img4off = new Image();
img4off.src = "images/right_buttoncap.gif";

img5on = new Image();
img5on.src = "images/right_buttoncap_rollover.gif";

img5off = new Image();
img5off.src = "images/right_buttoncap.gif";
}

// Function to 'activate' images.

function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");
}
}

// Function to 'deactivate' images.

function imgOff(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "off.src");
}
}

window.onerror=null;
// -->
</SCRIPT>

</head>

<body>
<a href="#top" onMouseOver="imgOn('img1')" onMouseOut="imgOff('img1')"
class="subnav_link">Latest News</a>
Jul 20 '05 #1
11 7494
"Penelope Baker" <pe***********@chartermi.net> wrote in
news:10*************@corp.supernews.com:
I cannot seem to get IE 6.0 to pre-cache my rollover images. Every
time the user rolls over a link, it rereads it from the server, even
though it is well into the cache by that time. It works fine in
Netscape, Mozilla, Firebird, Firefox, etc. Suggestions? (Other than
the obvious one regarding IE :P)


Have you tried emptying your cache first? IE6 does some rather weird
things (like not letting you view source) when its cache fills up.
Jul 20 '05 #2
Yeah, this happens on everyone's computer.

Peace,
Pen

"Eric Bohlman" <eb******@earthlink.net> wrote in message
news:Xn*******************************@130.133.1.4 ...
"Penelope Baker" <pe***********@chartermi.net> wrote in
news:10*************@corp.supernews.com:
I cannot seem to get IE 6.0 to pre-cache my rollover images. Every
time the user rolls over a link, it rereads it from the server, even
though it is well into the cache by that time. It works fine in
Netscape, Mozilla, Firebird, Firefox, etc. Suggestions? (Other than
the obvious one regarding IE :P)


Have you tried emptying your cache first? IE6 does some rather weird
things (like not letting you view source) when its cache fills up.

Jul 20 '05 #3
In article <10*************@corp.supernews.com>,
"Penelope Baker" <pe***********@chartermi.net> wrote:
I cannot seem to get IE 6.0 to pre-cache my rollover images.
Javascript for the rollover included below.


<snip code>

Preloading rollover states is unnecessary if you use some CSS:

<http://www.pixy.cz/blogg/clanky/cssnopreloadrollovers/>

Rollovers, with no scripting and lean code. :-)

Jeroen Visser

--
vizi fotografie & grafisch ontwerp

I http://www.vizi.nl
Jul 20 '05 #4
Er, well, IE 6.0 SP1 or greater. Older versions seem fine.

Peace,
Pen

"Penelope Baker" <pe***********@chartermi.net> wrote in message
news:10*************@corp.supernews.com...
Yeah, this happens on everyone's computer.

Peace,
Pen

"Eric Bohlman" <eb******@earthlink.net> wrote in message
news:Xn*******************************@130.133.1.4 ...
"Penelope Baker" <pe***********@chartermi.net> wrote in
news:10*************@corp.supernews.com:
I cannot seem to get IE 6.0 to pre-cache my rollover images. Every
time the user rolls over a link, it rereads it from the server, even
though it is well into the cache by that time. It works fine in
Netscape, Mozilla, Firebird, Firefox, etc. Suggestions? (Other than
the obvious one regarding IE :P)


Have you tried emptying your cache first? IE6 does some rather weird
things (like not letting you view source) when its cache fills up.


Jul 20 '05 #5
I've been considering that, but I kinda like the more ensured compatibility
from the Javascript...

Peace,
Pen

"Jeroen Visser [ vizi ]" <j.******@vizi.nl> wrote in message
news:j.****************************@news.tudelft.n l...
In article <10*************@corp.supernews.com>,
"Penelope Baker" <pe***********@chartermi.net> wrote:
I cannot seem to get IE 6.0 to pre-cache my rollover images.
Javascript for the rollover included below.


<snip code>

Preloading rollover states is unnecessary if you use some CSS:

<http://www.pixy.cz/blogg/clanky/cssnopreloadrollovers/>

Rollovers, with no scripting and lean code. :-)

Jeroen Visser

--
vizi fotografie & grafisch ontwerp

I http://www.vizi.nl

Jul 20 '05 #6
On Mon, 16 Feb 2004 11:20:45 -0500, Penelope Baker
<pe***********@chartermi.net> wrote:
I cannot seem to get IE 6.0 to pre-cache my rollover images. Every time
the user rolls over a link, it rereads it from the server, even though
it is well into the cache by that time. It works fine in Netscape,
Mozilla, Firebird, Firefox, etc. Suggestions? (Other than the obvious
one regarding IE :P)
[snip]
<SCRIPT LANGUAGE = "javascript">
You are using a deprecated attribute (language has been deprecated for
over 6 years), but strangly missing a required one. The above should be:

<script type="text/javascript">
<!--
The practice of hiding scripts is unnecessary now, unless your target
audience uses browsers that don't understand the SCRIPT element (they'd
have to be very old, on the order of 10 or so years).

[snip]
// Function to 'activate' images.

function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");


Why on Earth are you using eval()? imgName is a string, "on.src" is a
string literal, and + can be (is) a string concatenation operator. Please
explain why eval() is necessary.

[snip]

Mike

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #7
Penelope Baker wrote:
I cannot seem to get IE 6.0 to pre-cache my rollover images. Every time
the user rolls over a link, it rereads it from the server, even though it
iswell into the cache by that time. It works fine in Netscape, Mozilla,
Firebird, Firefox, etc. Suggestions? (Other than the obvious one
regarding IE :P)


It sounds like you are sending the wrong HTTP headers when you respond to
image requests. Unless you post a link, it's impossible to say (that's
part of the reason why posting a URL to a testcase is more likely to get
you useful help here than pasting code).

<URL:http://www.mnot.net/cache_docs/>

--
Jim Dabell

Jul 20 '05 #8
In article <10*************@corp.supernews.com>,
"Penelope Baker" <pe***********@chartermi.net> wrote:
I cannot seem to get IE 6.0 to pre-cache my rollover images.
Javascript for the rollover included below.


Preloading rollover states is unnecessary if you use some CSS:
<http://www.pixy.cz/blogg/clanky/cssnopreloadrollovers/>


I've been considering that, but I kinda like the more ensured compatibility
from the Javascript...


Compatibility with what? CSS rollovers work in Opera 7, Mozilla, Safari,
Firefox, IE5.5+, IE5.x/Mac and more. Usage statisticss of Netscape 4.x,
IE4.x and other 4th generation browsers are steadily declining; besides:
the CSS solution degrades rather nicely. Presentation might be lost, but
content and meaning are preserved.

Jeroen Visser

--
vizi fotografie & grafisch ontwerp

I http://www.vizi.nl
Jul 20 '05 #9

[Please don't post upside down.]

Penelope Baker wrote:
"Jeroen Visser [ vizi ]" <j.******@vizi.nl> wrote in message
news:j.****************************@news.tudelft.n l...

[snip]
Preloading rollover states is unnecessary if you use some CSS:

<http://www.pixy.cz/blogg/clanky/cssnopreloadrollovers/>

Rollovers, with no scripting and lean code. :-)


I've been considering that, but I kinda like the more ensured
compatibility from the Javascript...


There's nothing "ensured" about Javascript. CSS rollovers work in the vast
majority of browsers you are likely to encounter, and are far less likely
to be deliberately switched off or filtered out than Javascript. Expect
CSS rollovers to be more "compatible" than Javascript rollovers in the near
future, if they aren't already.

Plus, there's the added bonus of not having to mess around with the HTML,
unlike your current approach (although, given better Javascript, this would
be unnecessary with that too).
--
Jim Dabell

Jul 20 '05 #10
Thank you all.

Peace,
Penelope

"Penelope Baker" <pe***********@chartermi.net> wrote in message
news:10*************@corp.supernews.com...
Greetings:

I cannot seem to get IE 6.0 to pre-cache my rollover images. Every time
the
user rolls over a link, it rereads it from the server, even though it is
well into the cache by that time. It works fine in Netscape, Mozilla,
Firebird, Firefox, etc. Suggestions? (Other than the obvious one
regarding
IE :P)

Thanks!

Peace,
Pen

Javascript for the rollover included below.
<head>
<SCRIPT LANGUAGE = "javascript">
<!--

if (document.images) { // Active Images
img1on = new Image();
img1on.src = "images/right_buttoncap_rollover.gif";

img1off = new Image();
img1off.src = "images/right_buttoncap.gif";

img2on = new Image();
img2on.src = "images/right_buttoncap_rollover.gif";

img2off = new Image();
img2off.src = "images/right_buttoncap.gif";

img3on = new Image();
img3on.src = "images/right_buttoncap_rollover.gif";

img3off = new Image();
img3off.src = "images/right_buttoncap.gif";

img4on = new Image();
img4on.src = "images/right_buttoncap_rollover.gif";

img4off = new Image();
img4off.src = "images/right_buttoncap.gif";

img5on = new Image();
img5on.src = "images/right_buttoncap_rollover.gif";

img5off = new Image();
img5off.src = "images/right_buttoncap.gif";
}

// Function to 'activate' images.

function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");
}
}

// Function to 'deactivate' images.

function imgOff(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "off.src");
}
}

window.onerror=null;
// -->
</SCRIPT>

</head>

<body>
<a href="#top" onMouseOver="imgOn('img1')" onMouseOut="imgOff('img1')"
class="subnav_link">Latest News</a>

Jul 20 '05 #11
The CSS based solution shows the same problem on the same browsers on
multiple different servers (that I do and do not control). Thus it is not a
header problem, nor a code problem, nor something that can be solved with
CSS. I think something is el funk with this latest security update on IE...

Peace,
Pen
"Jeroen Visser [ vizi ]" <j.******@vizi.nl> wrote in message
news:j.****************************@news.tudelft.n l...
In article <10*************@corp.supernews.com>,
"Penelope Baker" <pe***********@chartermi.net> wrote:
> > I cannot seem to get IE 6.0 to pre-cache my rollover images.
> > Javascript for the rollover included below.
>
> Preloading rollover states is unnecessary if you use some CSS:
> <http://www.pixy.cz/blogg/clanky/cssnopreloadrollovers/>


I've been considering that, but I kinda like the more ensured
compatibility
from the Javascript...


Compatibility with what? CSS rollovers work in Opera 7, Mozilla, Safari,
Firefox, IE5.5+, IE5.x/Mac and more. Usage statisticss of Netscape 4.x,
IE4.x and other 4th generation browsers are steadily declining; besides:
the CSS solution degrades rather nicely. Presentation might be lost, but
content and meaning are preserved.

Jeroen Visser

--
vizi fotografie & grafisch ontwerp

I http://www.vizi.nl

Jul 20 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Alan Illeman | last post by:
How do I set several different properties for PRE in a CSS stylesheet, rather than resorting to this: <BODY> <PRE STYLE="font-family:monospace; font-size:0.95em; width:40%; border:red 2px...
2
by: Buck Turgidson | last post by:
I want to have a css with 2 PRE styles, one bold with large font, and another non-bold and smaller font. I am new to CSS (and not exactly an expert in HTML, for that matter). Is there a way to...
8
by: Jarno Suni not | last post by:
It seems to be invalid in HTML 4.01, but valid in XHTML 1.0. Why is there the difference? Can that pose a problem when such a XHTML document is served as text/html?
0
by: Wayne Aprato | last post by:
Can anyone please help me with the following madness in Access 2003 (2000 file format). I am using 2 similar funtions, the first which works fine to save reports as snapshots: On Error Resume...
1
by: Ebrahim | last post by:
This message is in reply to a prev 1 . My application refues to close . Some one had suggested that I might have threads running.. but i solved that problem too . The app still refuses to close...
7
by: Rocky Moore | last post by:
I have a web site called HintsAndTips.com. On this site people post tips using a very simply webform with a multi line TextBox for inputing the tip text. This text is encode to HTML so that no...
9
by: Eric Lindsay | last post by:
I can't figure how to best display little snippets of shell script using <pre>. I just got around to organising to bulk validate some of my web pages, and one of the problems occurs with Bash...
3
by: RadhikaG | last post by:
my dropdownlist_selectedindexchange method just refuses to get invoked when i switch from any value in the dropdown list to the default value. why??? how do i get it work for this as well?
12
by: Rainer Queck | last post by:
Hi NG, I have no idea why, but since a while a dataset refuses to write to a specific xml file. I get the error message "Der Zugriff auf den Pfad...
0
by: poe | last post by:
Hello, I have a large database table running on SQL Server 8.0. It currently has nearly 98 million records on it's ways to 125 million. I am doing inserts as quickly as the server can handle it,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.