Alex Rivera | Logout

How to start automatic download of a file in Internet Explorer?

Asked 2008-10-01T08:19:29.050
78

How do I initialize an automatic download of a file in Internet Explorer?

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.

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

Edit
Report

2 Answers

3

I checked and found, it will work on button click via writing onclick event to Anchor tag or Input button

onclick='javascript:setTimeout(window.location=[File location], 1000);'
answered 2012-06-16T05:44:36.273
2

Be sure to serve up the file without a no-cache header! IE has issues with this, if user tries to "open" the download without saving first.

answered 2008-10-03T18:11:38.750

Your Answer