Please open the test page in a mainstream browser and view the http request in Fiddler. 1. Hide the image 2. Repeat images 3. Repeating Background 4. Background of non-existent elements 5. Hide the background of an element 6. Multiple Backgrounds 7. Hover background loading 8. Images in innerHTML in JS 9. Image preloading Copy code The code is as follows:<script type="text/javascript"> new Image().src = '1.jpg'; new Image().src = '2.jpg';</script> In an environment without JS support, you can use hidden elements to preload: <img src="1.jpg" style="visibility: hidden; height: 0; width: 0" />Test: test_9.html Finally, the summary 1. Opera does not generate requests for hidden images and backgrounds of hidden elements. Extra 1. When using Fiddler to monitor Opera, if it is a local server, you need to check the local server in Opera's proxy server settings. 2. Another foolproof way to check the number of HTTP requests is to directly check the Apache access.log file. 3. My Firefox generates duplicate requests for repeated images and repeated backgrounds. Disabled all extensions, the problem still exists. If anyone knows the details, please let me know. |
<<: A brief analysis of adding listener events when value changes in html input
>>: Uniapp implements DingTalk scan code login sample code
Ubuntu16.04 install and uninstall pip Experimenta...
Table of contents 1. What is Bubble Sort 2. Give ...
Table of contents 1. Introduction to label statem...
This article describes how to add or expand a dis...
Preface The general methods are not listed here, ...
Table of contents 1. Introduction to jQuery 2. jQ...
The installation of compressed packages has chang...
conda update conda pip install tf-nightly-gpu-2.0...
Table of contents 1. Shared CommonModule 2. Share...
Table of contents Memory Pool Overview 1. nginx d...
The following code introduces the installation me...
Table of contents Create a vue + ts project using...
Kernel: [root@opop ~]# cat /etc/centos-release Ce...
Table of contents Preface Solution Tool Introduct...
Table of contents 1. Project folder structure 1. ...