[thelist] Forcing IE to download a file rather than displaying it?

Ben Henick persist1 at io.com
Sat Dec 29 02:31:19 CST 2001


On Fri, 28 Dec 2001, Bob Haroche wrote:

> I need to create a web space where my client can upload Word (.doc) files
> and Acrobat (.pdf) files. When the user clicks on a file link, it should
> force the browser to respond with a "save file" dialog box.

The easiest way out is to provide instructions to select ("Save Target
As...") from the context menu.

Otherwise, if Word or Word Reader (et. al.) is installed, IE/Win will see
that filename extension, go "oh!  I can display that file inline!" and proceed
to do it.

There are hacks to get around this, but if there're any that aren't more
trouble than they're worth I dunno what they are.

P.S.  This (mis)feature is one of the bigger security holes in Windows.


-- 
Ben Henick
Web Author At-Large              Managing Editor
http://www.io.com/persist1/      http://www.digital-web.com/
persist1 at io.com                  bmh at digital-web.com
--
"Are you pondering what I'm pondering, Pinky?"
"I think so, Brain, but... (snort) no, no, it's too stupid."
"We will disguise ourselves as a cow."
"Oh!" (giggles) "That was it exactly!"





More information about the thelist mailing list