<p>How do I initialize an automatic download of a file in Internet Explorer?</p>

<p>For example, in the download page, I want the download link to appear and a message: "If you download doesn't start automatically .... etc". The download should begin shortly after the page loads.</p>

<p>In Firefox this is easy, you just need to include a meta tag in the header, <code>&lt;meta http-equiv="Refresh" content="n;url"&gt;</code> where n is the number of seconds and <code>url</code> is the download URL. This does not work in Internet Explorer. How do I make this work in Internet Explorer browsers?</p>

I recently solved it by placing the following script on the page.
```
```
setTimeout(function () { window.location = 'my download url'; }, 5000)
```
```
I agree that a meta-refresh would be nicer but if it doesn't work what do you do...