homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

Force download
with out using ASP.

 12:12 pm on Jun 17, 2003 (gmt 0)

is there anyway to force download not using ASP (or any other server side script)?




 1:27 pm on Jun 17, 2003 (gmt 0)

Force download?

How do you mean?


 1:55 pm on Jun 17, 2003 (gmt 0)

i mean when i use this tag:

<a href="mymovie.avi">mymovie.avi</a>

it won't open the movie using explorer. instead i want the download dialog box to pop.


 2:00 pm on Jun 17, 2003 (gmt 0)

Wouldn't that depend on the user's platform? If I have my browser set to automatically "run" AVI instead of prompting me to run or save?

The tag you're using is the correct one. If you wanted to embed it to display within a web page itself, you'd use <object>.


 2:06 pm on Jun 17, 2003 (gmt 0)

We've looked into this recently and our research led us to the conclusion that we can't control this; it's a client configuration issue.

i.e. if, under Windows Explorer > Tools > Folder Options, the file type is marked as 'Browse In Same Window' then it's going to do just that. We further found myriad reasons that different file-types behave the way they do... it's a nightmare!

We just gave up in the end and let the client do what ever it was going to do...


 2:10 pm on Jun 17, 2003 (gmt 0)

Ok. let me be more clear about my problem.

i have short DivX movies (3MB each) on my site that i want the users to be able to see.

opening the movie using explorer cuase alot of trubles and i don't know anyway to stream DivX video.

there is a way in ASP that i can force the download box to apear and then the user can save and view the file, but i don't want (can't) to use it.

what is the best way to link to those DivX files?


 2:38 pm on Jun 17, 2003 (gmt 0)

The code is
<a href="mymovie.avi">mymovie.avi</a>

Maybe your ASP technique works because it changes the HTTP headers? For instance, instead of the web server delivering the movies as the default MIME type for the extension (say "video/x-msvideo") it tells the browser it is instead delivering a DivX video ("video/x-application-divx"?) or something unknown ("application/octet-stream"). That's purely a guess; if you have access to your server's configuration perhaps you could try "dumbing it down" by fiddling with the MIME.

[edited by: choster at 2:39 pm (utc) on June 17, 2003]


 2:39 pm on Jun 17, 2003 (gmt 0)

yes truthfully, the only thing I would think that would work would be to ask them to right click on the link and do "save target as".

Because Joshie is right, clients can set up how they want the left click to behave regardless, so theres not certains in what will happen.


 2:59 pm on Jun 17, 2003 (gmt 0)

How about zipping the movie up and linking to the zip file? Most (all?) browsers will save a zip archive rather than try to open it...


 3:05 pm on Jun 17, 2003 (gmt 0)

so there is no "right" way to do it... :(

i guess i just have to write to the users "right click..." or use the zip option, it a nice option but can be to complicated to regular users.

thanks for the help.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved