type to my local application in the major browsers?
I want to invent a new mime-type and associate it to a custom application in the browser to enable users to launch my app from a web page. The users of my secure web site are in a closed-environment, meaning this is not a general-purpose, mainstream application - I can configure their browser ahead of time.
Spoon.net does something very similar to enable launching virtualized applications using their mini-kernel plugin.
One of the answers to this question alluded to this method, without details for how to accomplish it.
How do I achieve this in a cross-platform manner on Chrome and IE 8/9? Is there a way to do the mime-type association through browser extensions, either native or through crossrider? How does an app like Adobe Reader or Apple Quicktime achieve this? I want to avoid touching the registry if possible.
What are the risks associated with this method? My site is an intranet web application secured with a certificate and trusted by my users. Any reason I should not go down this path?
EDIT : Apparently this can be achieved in Firefox by manipulating the mimeTypes.rdf file.
EDIT : It looks like JDIC is a Java-based mechanism that could be used for the same thing. Is there a similar non-Java construct? Maybe in Javascript?
It looks like it can be done via a registry change on windows.
[HKEY_CLASSES_ROOT.atom]
@="atom_file"
[HKEY_CLASSES_ROOTatom_file]
@="Atom Syndication Program"
[HKEY_CLASSES_ROOTatom_fileshell]
[HKEY_CLASSES_ROOTatom_fileshellopen]
[HKEY_CLASSES_ROOTatom_fileshellopencommand]
@=""C:AtomHandlerhandle.exe" %1"
[HKEY_CLASSES_ROOTMIMEDatabaseContent Typeapplication/atom+xml]
"Extension"=".atom"
Further reading on Windows...
And here's how to do so on Linux.
Use xdg-utils from freedesktop.org Portland
链接地址: http://www.djcxy.com/p/61324.html上一篇: 如何检测应用程序是从Google Chrome安装的?
下一篇: 在主流浏览器中键入我的本地应用程序?