HTML img force refresh loading

The img refresh mechanism is refreshed when the url changes.

When the url does not change and you want to refresh it, you can do the following:

let url = `http://pic27.nipic.com/20130321/9678987_225139671149_2.jpg`;
 
const time = new Date().getTime();
 
url = `${url}?time=${time}`

Guess you like

Origin blog.csdn.net/qq_59747594/article/details/132393274