The problem of two requests when the src attribute value of the img tag is empty (non-IE browser)

The problem of two requests when the src attribute value of the img tag is empty (non-IE browser)
When the img src value is empty, two requests are made. Some students may have encountered similar situations before. When there is a tag like <img src=''>, an extra request will be made to the page.
Based on the analysis of an article, I guess that all tags that actively introduce external files will have this problem, such as embed, link, etc.
Therefore, it was verified by experiment.
The following are preliminary conclusions :
Tags/Requests/Browser IE FF, Safari, Chrome
Img 2 2
Embed 1 2
Background: url 1 2
Link 1 2
Input type='image' 2 2
Script 1 2
bgsound 2

Note :
1. For the two requests of IE and Firefox, the pages they request are different.
IE: The request is for the directory where the accessed file is located, such as the img tag, the second request is http://www.xxxx.cn/test/
FF, Safari, Chrome: The requested file is the one being accessed

2. For the embed tag, the above description is when type is not empty. When type is empty, FF requests 1, and IE responds differently depending on the type value.

3. If the above tags do not contain src="", no secondary request will occur.

<<:  This article will show you what Vite does to the browser's request

>>:  Pure CSS3 to achieve mouse over button animation Part 2

Recommend

Detailed explanation of MySQL transactions and MySQL logs

Transactional Characteristics 1. Atomicity: After...

Analysis of the implementation process of three modes of VMWare network adapter

Three modes Bridged (bridge mode), NAT (network a...

HTML/CSS Basics - Several precautions in HTML code writing (must read)

The warning points in this article have nothing t...

MySql fuzzy query json keyword retrieval solution example

Table of contents Preface Option 1: Option 2: Opt...

Detailed introduction to logs in Linux system

Table of contents 1. Log related services 2. Comm...

Using JS timer to move elements

Use JS timer to make an element to make a method ...

React concurrent function experience (front-end concurrent mode)

React is an open-source JavaScript library used b...

mysql replace part of the field content and mysql replace function replace()

[mysql] replace usage (replace part of the conten...

Eight examples of how Vue implements component communication

Table of contents 1. Props parent component ---&g...

Repair solution for inconsistent MySQL GTID master and slave

Table of contents Solution 1: Rebuild Replicas Pr...

Difference and implementation of JavaScript anti-shake and throttling

Table of contents 1. Anti-shake 2. Throttling 3. ...

A useful mobile scrolling plugin BetterScroll

Table of contents Make scrolling smoother BetterS...