Welcome to WebmasterWorld Guest from

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

Displaying executable files in webpages



11:04 am on Oct 2, 2008 (gmt 0)

5+ Year Member

I have a game which is in the executable file format.I want it to appear in my webpage.Is there any way of embedding it?


8:27 pm on Oct 2, 2008 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Welcome aboard sctsree, the short answer is probably "no." Unless the file type is one managed by browsers, it will likely prompt for a download. This is an issue of security, as well as a standardization of content-type.

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.


3:37 am on Oct 4, 2008 (gmt 0)

5+ Year Member

thanks for the useful info

Featured Threads

Hot Threads This Week

Hot Threads This Month