Javascript – Force Mime Type in Browser (with Javascript)

javascriptmime-types

[I imagine that this is impossible due to security concerns, but:]

Is it possible to force the browser to handle a file with a certain mime type without controlling the server? I'm serving up files from file:// (on the client's machine itself) and I'd like to get text files to open in whatever their associated text editor is.

Note: Firefox just opens the file for viewing, which is not the desired behavior. I've tried changing the file extension even to something unknown, which does not help.

Best Answer

Nope, this is impossible, except maybe with IE and an ActiveX, but I seriously suggest you not to use it.