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

How to check if data exists before inserting in mysql

Business scenario: The visitor's visit status...

Vue implements the method of displaying percentage of echart pie chart legend

This article mainly introduces the pie chart data...

JavaScript pie chart example

Drawing EffectsImplementation Code JavaScript var...

Summary of mysqladmin daily management commands under MySQL (must read)

The usage format of the mysqladmin tool is: mysql...

Implementation of code optimization for Vue2.x project performance optimization

Table of contents 1 Use of v-if and v-show 2. Dif...

Detailed explanation of this pointing problem in JavaScript

Preface The this pointer in JS has always been a ...

WeChat Mini Program User Authorization Best Practices Guide

Preface When developing WeChat applets, you often...

MySQL 8.0.18 installation and configuration method graphic tutorial

This article records the installation and configu...

Detailed explanation of mixins in Vue.js

Mixins provide distributed reusable functionality...

JS implements the rock-paper-scissors game

This article example shares the specific code of ...

Image hover toggle button implemented with CSS3

Result:Implementation Code html <ul class=&quo...

Detailed explanation of the function and usage of keepAlive component in Vue

Preface During the interview, many interviewers m...

Design theory: On the issues of scheme, resources and communication

<br />This problem does not exist in many sm...

JavaScript operation elements teach you how to change the page content style

Table of contents 1. Operation elements 1.1. Chan...