Portrait of Edd Dumbill, taken by Giles Turnbull

Subscribe to updates

Feed icon Atom or RSS

or get email updates

What I make

a conference management web application

XTech Conference
a European web technology conference

Not so sure I like the real world

Writing applications for the real world (ie. where people use Microsoft Windows) can be frustrating. Theoretically, the effort it takes to provide a password-protected download of a Microsoft Office file ought to be significantly less than other, more productive, programming tasks.

What I wanted to do was this: have the user log in to the site, using our regular cookie-provided authentication, click on the link to the file, have it download and then open up in the Office application concerned.

Pretty easy, you may think. Just deliver the file with Content-disposition: attachment so it opens up in a helper app, not embedded in the browser window.

Works great with Firefox anywhere. Try it with Microsoft Internet Explorer, and Office fires up, then complains the file doesn't exist. Look in the browser's cache, and it's there. Scream.

Click on it again, with Office still running, and it works fine. Scream again.

Now waste two days looking for a solution.

The workaround I've arrived at is ugly but effective. Write, in big bold lettering, instructions that IE users must right-click the link and select "Save Target As", then double-click the file they saved.

I'd love to know if anybody else has a better solution. I've found other web sites that implement the same fix as mine.

(I had, naively, been wondering the other week why people ever invented the class of applications known as "download managers". Or why Microsoft themselves provide downloads by a rather circuitous route involving ActiveX controls. Silly me.)

Update: Thanks for all the suggestions emailed in. I'll write a summary here when I find the working solution.

blog comments powered by Disqus

You are reading the weblog of Edd Dumbill, writer, programmer, entrepreneur and free software advocate.
Copyright © 2000-2012 Edd Dumbill