admin管理员组

文章数量:1410706

Does Google chrome support custom MIME types? Actually, I added our own MIME type in Windows Registry that Chrome should support. But, Chrome cannot read that. I have written one method in JavaScript. In that method m calling Navigator.MimeType["<customMimeType>"] . If script is executed in Firefox it gives right result but for chrome this statement doesn't work. How can I create custom MIME type in Chrome? Is there any other way by which Plugins register their MIME type and Chrome detects that? can anybody please provide good resource to build plugin (not extension) for chrome?

Does Google chrome support custom MIME types? Actually, I added our own MIME type in Windows Registry that Chrome should support. But, Chrome cannot read that. I have written one method in JavaScript. In that method m calling Navigator.MimeType["<customMimeType>"] . If script is executed in Firefox it gives right result but for chrome this statement doesn't work. How can I create custom MIME type in Chrome? Is there any other way by which Plugins register their MIME type and Chrome detects that? can anybody please provide good resource to build plugin (not extension) for chrome?

Share Improve this question edited Mar 6, 2012 at 10:57 Guy Cook 5524 silver badges17 bronze badges asked Mar 6, 2012 at 10:06 Kiran ThokalKiran Thokal 4054 gold badges8 silver badges21 bronze badges 3
  • 1 are you referring to navigator.mimeTypes? – Janus Troelsen Commented May 10, 2013 at 9:29
  • yes. Navigator.MimeType["<customMimeType>"] – Kiran Thokal Commented May 10, 2013 at 9:36
  • On my machine the same java script when run on two different browsers give different result for Navigator.MimeType.Length. In Firefox length of MimeType array is 31 and for Chrome it's 23. Means Chrome could not detect some types that can be detected by firefox. – Kiran Thokal Commented May 10, 2013 at 9:52
Add a ment  | 

3 Answers 3

Reset to default 2

Sorry but to my knowledge there is no patibility in this current version of google chrome. You could though use a standard MIME instead with the custom MIME.

Using the standard MIME Type would be the best option rather than the customized one.Chrome does not support the customized MIME types.Thanks

Have you defined all type of parameters in registry in windows??

Please refer old post to define custom mime in windows link

If you have missed last line

[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/atom+xml]
    "Extension"=".atom"

here .atom is your type and application/atom+xml is your definition.

you have not defined you mime type name or definition so not able to judge on that, please define if the above does not help..

本文标签: javascriptDoes Google chrome support custom MIME typesStack Overflow