Comment 263 for bug 25830

Revision history for this message
In , Stewart (smjg) wrote :

(In reply to Michael Lippert from comment #217)
> Addressing this issue would help a lot of power users. I think all that's needed is the capability to set somewhere (even about:config) that all unknown text/* types should be handled as internally as text/plain.

I disagree. It's only natural that sometimes the user will want to save the file to disk, sometimes the user will want to open the file in an external application, and sometimes the user will want to view the file in the browser. Why should we force the user to choose on an all-or-nothing basis, and moreover restrict it to text/* types?

> There are other text/* types that it would be really nice if they were just viewable in the browser rendered as text/plain, such as those for source files (text/x-c, text/x-java-source, ...).

Indeed, Moreover, there are many text-based file formats out there - not just those that have text/* MIME types (e.g. application/xml, and apparently application/javascript and application/json exist as well).

> On my system the mime type is also associated w/ the list of applications I select from in the file manager to open those files, so I want to be able to distinguish them from one another (I want to open markdown files with different applications than js source files or script files for example). I mention this because one workaround suggested was just to tag markdown files as text/plain, but I'd rather continue to use Chrome than lose the ability to distinguish the files in the file manager.

What kind of "system" is this - an operating system, or a website with an associated file manager?

The MIME type is for specifying what kind of file it is, not what the user agent is to do with it. We shouldn't force anybody to misdeclare MIME types in order to work around browser restrictions. We should fix the restrictions.