Welcome to WebmasterWorld Guest from 188.8.131.52
Forum Moderators: mack
The server "tells" the browser what the file type is. So if it's a .jpg, it sends the header content-type:image/jpg so the browser knows to display this as an image. If it's an html document, it sends the header content-type:text/html so it knows to parse the document as a web page and display it accordingly.
For executables, there is no "appropriate" content-type. The only thing the browser knows to do is open dialog to run the file or download/save it. Imagin if this were not the case - any hacker could load a page with a link to the exe and poof, you're hacked.
The only methods that work for this are via the <object> tag, used for inline executables like Flash, Applets, and other objects, which also get the appropriate content-type headers (application/flash, etc.) But for a command-line executable, unless you build some browser-based GUI to make it display and generate the correct content-type header, I doubt it will work.