Created
August 19, 2021 15:18
-
-
Save hmahadik/f77385e4260db608db3ad422b2227a6d to your computer and use it in GitHub Desktop.
Refreshes the first HTML img element every 5 seconds.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let interval = setInterval(()=>{ | |
let img = document.getElementsByTagName("img").item(0); | |
img.src = img.src; | |
console.log("Reloaded. Next reload in 5s."); | |
}, 5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment