Ask HN: Markdown in Web Browser
I've been researching for a few days now and in most web browsers[1] Markdown doesn't seem to be parsed. There are addons everywhere, but I don't want to install them. Since I am not a web developer, my question is if there is a specific reason for this. I actually only see advantages if websites could offer the well known .html but also .md files as format and that can be parsed right in the browser (with e.g. Github flavor). I am specifically concerned with how to save the step of parsing on my own system. For a small website this works quite well if I have e.g. only a hundred .md files, but for e.g. 5K it does get slower. Also I see the advantage as Markdown produces much smaller files. For a large project it doesn't matter, but if I have a small home server with solar power, I want to be more economical with my resources, right?
My question specifically is: is there a specific reason why current web browsers don't offer an in-house Markdown parser, and what are the specific advantages/disadvantages that I may have overlooked in my consideration.
[1] Tested on a Linux system. I did not test Google and Brave due to privacy concerns. Safari also falls out and so does Microsoft Edge.
Markdown is a document authoring format, and is intended to convert to many different formats. When presented with a file full of markdown, what format did you want that in? A webpage? PDF? Something else? Once that format is chosen, markdown doesn't have any way to control that presentation. Black text on white? Opposite? Something else? How wide should paragraphs be?
There's also several extensions to markdown, each with their own features and subtle edge cases.
You mentioned smaller files, but HTML is nearly as small after gzip/brotli, which your web server should be using for text-based resources anyway.
I think the main reason is that there is not a lot of demand for another standard. you already have HTML and XML. But almost no one use XML to render documents in web browsers and it will likely go away at some point and HTML will stay the only standard. In this context, it seems unlikely to add Markdown to save a few bytes.