IE 6.0+拒绝预先缓存图像? [英] IE 6.0+ refuses to pre-cache images?

查看:64
本文介绍了IE 6.0+拒绝预先缓存图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候:


我似乎无法让IE 6.0预先缓存我的翻转图像。每当

用户翻过一个链接时,它就会从服务器重新读取它,即使它在那时已经进入缓存了。它适用于Netscape,Mozilla,

Firebird,Firefox等。建议? (除了显而易见的关于

IE:P)


谢谢!


和平,



下面包含翻转的Javascript。

< head>

< SCRIPT LANGUAGE = " javascript">

<! -


if(document.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&q uot ;;


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";

}


//激活图像的功能。


函数imgOn(imgName){

if(document.images){

document [imgName] .src = eval(imgName +" on .src");

}

}


//'停用''图像的功能。


函数imgOff(imgName){

if(document.images){

document [imgName] .src = eval(imgName +" off.src");

}

}


window.onerror = null;

// - >

< / SCRIPT>


< / head>


< body>

< a href =" #top"的onMouseOver = QUOT; imgOn( IMG1’ )" onMouseOut =" imgOff(''img1'')"

class =" subnav_link">最新消息< / a>

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>

推荐答案

" Penelope Baker" < PE *********** @ chartermi.net>写在

新闻:10 ************* @ corp.supernews.com:
"Penelope Baker" <pe***********@chartermi.net> wrote in
news:10*************@corp.supernews.com:
我似乎无法得到IE 6.0预缓存我的翻转图像。用户在链接上滚动的每个时间,它都会从服务器重新读取它,即使它在那时很好地进入缓存。它适用于Netscape,Mozilla,Firebird,Firefox等。建议? (除了关于IE的显而易见的事情:P)
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)




您是否尝试先清空缓存?当缓存填满时,IE6做了一些相当奇怪的事情(比如不让你查看源代码)。



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


是的,这发生在每个人身上'电脑。


和平,




" Eric Bohlman" < EB ****** @ earthlink.net>在消息中写道

news:Xn ******************************* @ 130.133.1.4。 ..
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>在
新闻中写道:10 ************* @ corp.supernews.com:
"Penelope Baker" <pe***********@chartermi.net> wrote in
news:10*************@corp.supernews.com:
我似乎无法将IE 6.0推向前-cache我的翻转图像。用户在链接上滚动的每个时间,它都会从服务器重新读取它,即使它在那时很好地进入缓存。它适用于Netscape,Mozilla,Firebird,Firefox等。建议? (除了关于IE的显而易见的事情:P)
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)



您是否尝试过清空缓存?当缓存填满时,IE6做了一些相当奇怪的事情(比如不让你查看源代码)。



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



文章< 10 ** ***********@corp.supernews.com>,

" Penelope Baker" < PE *********** @ chartermi.net>写道:
In article <10*************@corp.supernews.com>,
"Penelope Baker" <pe***********@chartermi.net> wrote:
我似乎无法让IE 6.0预先缓存我的翻转图像。
下面包含翻转的Javascript。
I cannot seem to get IE 6.0 to pre-cache my rollover images.
Javascript for the rollover included below.




< snip code>


如果你使用一些CSS,就不需要预加载翻转状态:


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


翻转,没有脚本和精益代码。 :-)


Jeroen Visser


-

vizi fotografie& grafisch ontwerp


http://www.vizi.nl


这篇关于IE 6.0+拒绝预先缓存图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆