如何防止IE只使用HTML / CSS加载隐藏的内容? [英] How to prevent IE from loading hidden content using HTML/CSS only?

查看:80
本文介绍了如何防止IE只使用HTML / CSS加载隐藏的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您将html元素设置为 display:none 时,该元素内的内容(例如图片和Flash)不会被加载Firefox直到元素被设置为显示。
但Internet Explorer不像那样。它从一开始就加载隐藏的元素中的所有内容。

有没有一种方法可以防止IE在不使用javascript的情况下加载这些内容?

正如我的问题认为不使用javascript的解决方案,我会回答我自己的问题,只是说目前还没有办法阻止IE加载外部文件隐藏的内容。



正如其他答案所暗示的,有办法避免这个问题,但不是为了解决它。所以我的具体问题的答案是不。


When you set an html element to have display: none, the content inside that element (e.g. images and flash) wont be loaded by Firefox until the element is set to be displayed. But Internet Explorer dont behave like that. It loads everything inside hidden elements from start.

Is there a way to prevent IE from loading such content without using javascript?

解决方案

As my question regarded a solution not using javascript, I'll answer my own question and just say there is no way so far to prevent IE from loading external files that are part of hidden content.

As the other answers suggest it, there are ways to avoid the problem, but not to solve it. So the answer to my specific question is "NO".

这篇关于如何防止IE只使用HTML / CSS加载隐藏的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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