Hacker News new | past | comments | ask | show | jobs | submit login

I second this. I'm all in on Markdown and other ASCII-readable formats. By all means, render out to HTML to make things pretty, but consider keeping the source in plain text. You can browse my personal site with curl or even netcat:

curl https://anderspitman.net/txt/19

nc txt.anderspitman.net 3838 <<< /txt/19




Web browsers are terrible plain text readers. Especially mobile browsers. The problems are manifold.

If your plain text document has line breaks to enforce some column width it will rarely match a browser's viewport width. This means the browser will break lines to fit in the viewport but still respect line breaks. So you get lines broken by the viewport and then line breaks a few words later. The text does not flow well at all.

If you only have line breaks at the end of paragraphs the text might flow better but the default viewport width on mobile browsers is (usually) 980px. Desktop browsers set their viewport width to the window width. In either case text ends up hard to read because lines end up really long.

You also lose hyperlinking which makes the web...a web.

If you want a plain text website just make it HTML with a minimal or no stylesheet. A single viewport meta tag will keep the page readable everywhere. Setting it to the device width will make mobile browsers reflow the text based on the screen size.

No one is going to read your blog with netcat or just curl into a pager.


> If you want a plain text website just make it HTML with a minimal or no stylesheet

I have an HTML version of my blog for people who want to read it in browsers.

> No one is going to read your blog with netcat or just curl into a pager.

No one is going to read my blog, period.


No one is going to read your blog with netcat or just curl into a pager.

Idk, maybe we should revive the world of information served raw over TCP or telnet. HTTP is out of control.


In what way do you think HTTP is out of control?

Before you reply please keep in mind JavaScript web apps don't have anything to do with HTTP.


Ok, "out of control" is a slight exaggeration, but HTTP has become a complete reimplementation of what amounts to TCP or SCTP.


Again, in what way? TCP is making sure data gets where it's going and there were no errors introduced by the transmission. A raw TCP socket doesn't have any metadata about what the data is that's coming over the socket. There's a reason the Application layer exists in the first place.

You can make an argument that HTTP should be replaced with another application later protocol but just raw sockets everywhere is ridiculous.

HTTP has eaten the world of application layer protocols because it is flexible and expressive. It's also relatively easy to implement and there's lots of good FOSS server packages available. Most servers make it really easy to plug in back end applications. Combine that with ubiquitous HTTP clients and it's a super low barrier to entry.

You're not going to replace that ecosystem easily and you definitely won't replace it with raw sockets.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: