Callum Posted July 8, 2008 Share Posted July 8, 2008 You know when you download a file off of the internet, a download box appears, how do you make one of them? woud it be in html?If so could somebody direct me to a few tutorials in how to make a download boxThanksCallum Link to comment Share on other sites More sharing options...
Ingolme Posted July 8, 2008 Share Posted July 8, 2008 Just link to a .zip file, or a type of file that the browser won't attempt to render. Link to comment Share on other sites More sharing options...
Callum Posted July 8, 2008 Author Share Posted July 8, 2008 Sorry for sounding stupid,but would it work with something like a Word document or an Excel spreadsheet? as I don't want the browser rendering these,.I want the the user to have to download it or open it so it opens in the appropriate the office based programThanks Callum Link to comment Share on other sites More sharing options...
23.12.2012 Posted July 8, 2008 Share Posted July 8, 2008 Yes, it works. There are special applications for rendering these docs Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted July 10, 2008 Share Posted July 10, 2008 <a href="fileNameOfTheFile.FileExtension" type="application/octet-stream"> Link text </a> So with a real file... <a href="mortgages.xlsx" type="application/octet-stream"> Mortgages Spreadsheet </a> Hope this helps. Link to comment Share on other sites More sharing options...
Callum Posted July 11, 2008 Author Share Posted July 11, 2008 thanks , is the type necessary though? Link to comment Share on other sites More sharing options...
Synook Posted July 12, 2008 Share Posted July 12, 2008 No. Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted July 19, 2008 Share Posted July 19, 2008 No.Wasn't the point of this to create a download box? If so, the type attribute is necessary. Link to comment Share on other sites More sharing options...
Synook Posted July 19, 2008 Share Posted July 19, 2008 Why? Works fine for me without the attribute - browsers just read the content-type header. Link to comment Share on other sites More sharing options...
boen_robot Posted July 19, 2008 Share Posted July 19, 2008 Why? Works fine for me without the attribute - browsers just read the content-type header.I think this is a matter of additional settings.If you have an in-browser reader, IE will attempt to use it unless the Content-disposition header says otherwise. If you don't, there's always a download box. I'd personally never set Content-disposition though. Why not allow the user to directly read the file if they can? Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted July 19, 2008 Share Posted July 19, 2008 Well if you want the user to download the PDF, or Excel spreadsheet or whatever instead of it opening in Adobe Reader or Google Docs, then the way to do it is through the type attribute. Link to comment Share on other sites More sharing options...
boen_robot Posted July 19, 2008 Share Posted July 19, 2008 Well if you want the user to download the PDF, or Excel spreadsheet or whatever instead of it opening in Adobe Reader or Google Docs, then the way to do it is through the type attribute.OK, now... why would you want to deny the user this right?And I'm not sure about the type attribute, but setting Content-disposition is sure to work everywhere regardless of markup and the user agent. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.