在 CSS 中,iepngfix.htc 文件是否被调用一次,还是为每个元素重新读取?
我正在开发的一个网站刚刚超出了我们主机提供的每月带宽 (25,000 MB),在查看服务器统计信息和日志时,我发现 TwinHelix 的 iepngfix.htc
是排名第四的最大带宽消耗。#4 attempts:73939 KBytes:181035 /iepngfix.htc
我发现这特别有趣,因为.swf
用作背景图像每个页面只有 3,918 次点击,而 iepngfix.htc 收到的点击量为 73,939 次。我很难相信竟然有这么多 IE6 用户访问这个网站。
该文件在 screen.css
中按以下方式调用:
img, div, input { behavior: url("iepngfix.htc") }
我可以解释这个占用如此多带宽的 4KB 文件的唯一方法是,是否为每个 读取并重新读取该文件>img
、div
和 input
元素,无论是否使用 PNG,并且可能适用于除 IE 之外的更多浏览器。
我的理解正确吗? 如果有人能帮助我理解这一切是如何运作的,我将不胜感激。谢谢!
A site I am working on just exceeded the monthly bandwidth our host provides (25,000 MB) and when looking at the server stats and logs, I found TwinHelix's iepngfix.htc
to be the #4 largest bandwidth drain.
#4 hits:73939 KBytes:181035 /iepngfix.htc
I find this especially interesting because a .swf
used as a background image on every page had only 3,918 hits compared to the 73,939 hits that iepngfix.htc received. Hard for me to believe that there are even that many IE6 users visiting this site.
This file is being called within screen.css
in the following way:
img, div, input { behavior: url("iepngfix.htc") }
The only way I can explain this 4KB file eating so much bandwidth, is if it is being read and re-read for every single img
, div
, and input
element, whether or not there is a PNG used and possibly for more browsers than just IE.
Am I understanding this correctly?
If anyone could help me understand how all this works, it would be much appreciated. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能是您的 Web 服务器中没有为
.htc
文件扩展名正确设置缓存。检查响应标头,例如使用 Firebug,了解提供哪些缓存指令。另外,使用 Firebug 的“Net”选项卡,您将能够查看 URL 是否在非 IE 浏览器中加载。不应该,但你永远不知道。
It could be that caching is not properly set up for the
.htc
file extension in your web server. Check the response headers, e.g. using Firebug, for what caching instructions get served.Also using Firebug's "Net" tab, you'll be able to see whether the URL gets loaded in non-IE browsers. It shouldn't, but you never know.