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 / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

Displaying executable files in webpages

5+ Year Member

Msg#: 3757315 posted 11:04 am on Oct 2, 2008 (gmt 0)

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?



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

Msg#: 3757315 posted 8:27 pm on Oct 2, 2008 (gmt 0)

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.


5+ Year Member

Msg#: 3757315 posted 3:37 am on Oct 4, 2008 (gmt 0)

thanks for the useful info

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / New To Web Development
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