Home Web Front-end JS Tutorial A BUG solution to IE6 image loading_javascript skills

A BUG solution to IE6 image loading_javascript skills

May 16, 2016 pm 06:23 PM
bug ie6 Image loading

The code is as follows:

Copy code The code is as follows:

<!--[if IE 6 ]><script type="text/javascript">
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
</script>< ![endif]-->

Note: This BUG has been discovered before and is just mentioned again here.

For more detailed instructions, please refer to the following article:
Background images are not cached by default under IE6. Every time the position of the image is changed in CSS, the request will be reinitiated. Use this method to tell IE6 to cache the background image
Solve the problem of jitter during mouse operation when the image is used as the background in IE
Method 1, css (not recommended)
Copy code The code is as follows:

html {
filter: expression(document.execCommand("BackgroundImageCache", false, true));
}

Method 2, js
Copy content to clipboard
Copy code Code As follows:

try {
document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}

In fact now Most of the solutions to the problem use CSS background positioning. That is, all the icons on the entire page are placed on one picture. (Take mail 163 as an example)
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to optimize image loading failure display problem in Vue development How to optimize image loading failure display problem in Vue development Jun 29, 2023 am 10:51 AM

How to optimize image loading failure display problem in Vue development

What does game bug mean? What does game bug mean? Feb 18, 2024 am 11:30 AM

What does game bug mean?

How to solve the problem that Edge browser cannot load images How to solve the problem that Edge browser cannot load images Jan 30, 2024 am 10:54 AM

How to solve the problem that Edge browser cannot load images

Apple iOS18 bug summary Apple iOS18 bug summary Jun 14, 2024 pm 01:48 PM

Apple iOS18 bug summary

Vue lazy loading image failure problem solution Vue lazy loading image failure problem solution Jun 29, 2023 pm 10:42 PM

Vue lazy loading image failure problem solution

How to solve the problem that Windows 11 Microsoft Store images cannot be loaded How to solve the problem that Windows 11 Microsoft Store images cannot be loaded Jun 29, 2023 pm 03:43 PM

How to solve the problem that Windows 11 Microsoft Store images cannot be loaded

What does system bagage mean? What does system bagage mean? Nov 09, 2022 pm 02:40 PM

What does system bagage mean?

Sorting out Win11 errors and issues Sorting out Win11 errors and issues Jan 13, 2024 pm 08:21 PM

Sorting out Win11 errors and issues

See all articles