Download file; not open

  • Thread starter Thread starter Matthew
  • Start date Start date
M

Matthew

I have a problem on my site. I have DXF files (3D drawings) available for
download.

Sometimes, instead of downloading the file, IE will open it (like a text
file) instead. It looks like a bunch of gibberish to the user, and my
clients are not happy.

Is there a way to make the browser prompt to save the file instead of
opening it?

Matthew
 
It's not anything you can really tell the browser in code. Basically, the
browser is responsible for trying to figure out what the file is and if it
thinks it can render it, it will. Sometimes a user will accidentally hit the
Open option and, not paying attention to the fact that the "always do this
action" option is checked, it will always try to open that file.

The only thing you can really do is set a custom MIME type on the server.
There are a couple you could try, such as:
application/dxf
or a generic
application/octet-stream
to associate with the dxf file extensoin. Any way you look at this problem
though it's still dependant upon what software the user has on their
computer (ie: that the browser may know what to do with the file), how a
browser is set to handle a specific mime type, and what settings the user
may unknowingly have made.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
Back
Top