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 commands to view linux files

How to view linux files Command to view file cont...

Introduction to major browsers and their kernels

Trident core: IE, MaxThon, TT, The World, 360, So...

Design: A willful designer

<br />Years of professional art design educa...

Detailed explanation of routes configuration of Vue-Router

Table of contents introduce Object attributes in ...

How to make CSS child elements highly consistent with parent elements

Absolute positioning method: (1) Set the parent e...

JavaScript to implement a simple clock

This article example shares the specific code for...

Detailed process of installing logstash in Docker

Edit docker-compose.yml and add the following con...

CSS3 realizes the glowing border effect

Operation effect: html <!-- This element is no...

Mysql implementation of full-text search and keyword scoring method example

1. Introduction Today a colleague asked me how to...

Solution to MySQL startup successfully but not listening to the port

Problem Description MySQL is started successfully...

MySQL 8.0.12 Quick Installation Tutorial

The installation of MySQL 8.0.12 took two days an...