After js new image caches the picture, the value is assigned to the dom element and loaded again?

clipboard.png

clipboard.png

reloaded again in the onload callback. The same picture. Why. How to deal with

add
it"s OK to insert img directly into DOM, but I just want to know why the same resource will be loaded once more if it is directly put into src. Img comes with its own operation. Or server-side problem

Jan.08,2022

if the image has been loaded through onload and inserted into the img tag, you can take a look at Network

.
Menu