[thelist] Pradheep :: [Headers]

aardvark roselli at earthlink.net
Thu Aug 21 07:04:31 CDT 2003


> From: pradheep <pradheep at naturesoft.net>
[...]
> how do i download a particular file type in a simple html file without
> serverside scripting. i am not sure whether i can use headers. do tell
> me, its urgent.!!1 -- 

not much to go on here, pradheep...

are you trying to allow someone to download a .doc file, for example, 
but find it keeps opening in the browser? through a simple <a 
href="filename.ext">download</a> link, right?

couple options...

1. wrap the file up in a .zip archive... that usually prompts users 
to download... you could also just change the extension to something 
else browsers don't know and tell users to change it back, but that's 
too much of a hassle...

2. change your mime type for a particular file (like .doc) to 
application/octet-stream... test it to be sure it works... this is a 
header change, and without knowing your server, i can't tell you any 
more than that...

-- 
yet another book:
  The Web Professional's Handbook
  http://roselli.org/adrian/books/handbook.asp
  ISBN: 1904151221





More information about the thelist mailing list