Should I convert stored Markdown to HTML, or should I just store HTML?

后端 未结 4 1787
闹比i
闹比i 2021-02-02 16:13

Markdown seems to be easier to write and edit than HTML. All HTML editors I\'ve seen output a ton of unnecessary junk. Markdown seems cleaner.

Here is what I\'m thinking

4条回答
  •  -上瘾入骨i
    2021-02-02 16:45

    Stand back from your site and ask yourself how "expensive" it really would be. Do you serve more than 1,000 uniques per day? Realistically, is it going to balloon? With all these sorts of questions, the answer isn't clear cut. For example, when I was building websites for an international bank, a non-minimized CSS document could add 1 gigabyte per day of bandwidth. However, when I'm building my portfolio site, I'm expecting a fraction of that traffic.

    I'm certainly not advocating building inefficient code....just bear in mind that "cost" should really be measured as process times executions, not just process.

    If you're really concerned, record before- and after- times around the execution of a PHP Markdown process. Then, track server load for a period of times in an A/B fashion. Numbers don't lie.

提交回复
热议问题