I need to open a csv file in firefox. By default, he asks me to choose a download location or open it using an external program. However, in the context of the context, I have to display it directly in the browser as plain text, without going through the popup that asks me what to do with the file.
I tried to configure Firefox "mimetype.rdf" to force the content type "text / csv" to open in the browser. However, I do not find much information about this file, so I more or less guess ... This is what I came out with:
<RDF:Description RDF:about="urn:mimetype:text/csv"
NC:value="text/csv"
NC:editable="false"
NC:description="CSV page"
NC:fileExtensions="csv">
<NC:handlerProp RDF:resource="urn:mimetype:handler:text/plain"/>
</RDF:Description>
My idea was to make firefox treat text / csv as text / plain. This code does not work. But in any case, I managed to create a content type using the "Mason" extension of firefox. However, when the browser sees it as text / regular, it offers me to open it using notepad or download, it does not help me much.
I tried other types of content, text / html, text / xml, he always asked me about choosing an external application or downloading.
I tried to use several extensions, "openInBrowser" and "ViewAsText" made me do what I want, but I have to explicitly go to the menu and click "view as text in browser", there is no way to set the behavior for the content type "text / csv "
, , "text/csv" firefox ?
?