<a id="download" href="link of your file">click here to download the file</a>.
<script>
var downloadTimeout = setTimeout (
function() {
window.location = document.getElementById('download').href;
}, 4000);
</script>
This is not what I want, I need the image will be automatically downloaded when the time is stop by setTimeout but I can't get it. Please help me. Thank you