2 ms·
I’m puzzled by the first line, the HTML framing. Why not just serve it `content-type: text/plain; charset=utf-8`?
by chrismorgan 3y ago
I’m puzzled by the first line, the HTML framing. Why not just serve it `content-type: text/plain; charset=utf-8`?
- xjay 3y agoA byte-order mark (BOM) would have the highest priority. [1] BOM > HTTP charset > HTML meta charset Also works for local files (not served over HTTP). > You could skip the meta encoding declaration if you have a BOM, but we recommend that you keep it, since it helps people looking at the source code to ascertain what the encoding of the page is. [1] [1] https://www.w3.org/International/questions/qa-html-encoding-declarations https://www.w3.org/International/questions/qa-html-encoding-...
- brabel 3y agoIf you send Content-Length: text/plain, I believe there's no browser that will render it as HTML anyway.