3 ms·
I've been thinking a lot about this. Over the past week or so, I first made my blog browsable with cURL[0], then plain TCP sockets[1]. I learned a lot through t
by anderspitman 7y ago
I've been thinking a lot about this. Over the past week or so, I first made my blog browsable with cURL[0], then plain TCP sockets[1]. I learned a lot through this process, and relearned some things as well:
1. HTTP/1.1 is valuable. With the move to HTTP/2, we lost the principle of "simple things should be simple, complex things should be possible" (Alan Kay). All things in HTTP/2 are complex. I can make an HTTP/1.1 client on the command line with netcat.
2. Serving documents is incredibly simple[2] and safe (once you handle path vulnerabilities :D ).
3. We should extract web browsers from the behemoth JavaScript VMs we're all running now. I'm all for having portable VMs, and I like the direction WebAssembly is headed, but probably 80% of what I do on the web could be accomplished using an order of magnitude simpler software, accessing read-only documents.
4. Markdown and other human-readable formats are awesome. I used to think writing my blog in HTML had the least dependencies, but now I realize it makes you depend on a browser to render it, and that's a huge dependency. Markdown can be read as-is and therefore is almost dependency-free.
So I agree with the author here, and this is how I think we get there. Someone should make a stripped down web browser with the following attributes, or something similar:
1. Only speaks HTTPS
2. Only GET requests
3. A few choice headers, like Range for streaming video.
4. No JavaScript, or any Turing complete language at all.
5. Minimal CSS, ie colors, font sizes, flexbox. No animations (you don't have a language to trigger them with anyway).
6. Can probably throw away some HTML elements as well.
The nice thing about this approach is that sites made to work with this browser will still work in normal browsers. They'll just be super fast, low on resources, secure, and private.
[0] https://anderspitman.net/17/#curlable https://anderspitman.net/17/#curlable
[1] https://anderspitman.net/19/#netcatable https://anderspitman.net/19/#netcatable
[2] https://github.com/anderspitman/newb-server-go https://github.com/anderspitman/newb-server-go
- dvfjsdhgfv 7y ago> With the move to HTTP/2, we lost Fortunately, we haven't lost anything yet on that front as HTTP 1.1 is still supported by practically all servers and clients.
- anderspitman 7y agoYes, that's actually what I'm trying to convey, is that we shouldn't see 1.1 as something to deprecate. I'm in favor of maintaining that compatibility.