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
Preview versions of Safari (Technology Preview 10...
Command to add a route: 1.Route add route add -ne...
introduce This chapter mainly introduces the proc...
1. How to create a user and password 1. Enter the...
This article describes various ways to implement ...
After many difficult single-step debugging late a...
This article uses an example to describe how to c...
Blank's blog: http://www.planabc.net/ The use...
Preface Managing routing is an essential feature ...
There are many Hadoop installation tutorials on L...
1. Enter the configuration file of the yum source...
Get a deep understanding of how the Linux configu...
In actual work or interviews, we often encounter ...
Currently encountering such a problem My situatio...
Table of contents Preface 1. Paste Events and Cli...