Rendered at 23:22:05 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
colewilson 1 days ago [-]
Very neat! It's also possible to do this 100% statically without checking the user agent, by using alternate terminal buffers:
- `curl -L https://cole.ws` (my personal portfolio site) does this
It embeds the actual HTML inside an alternate terminal buffer (starting with `<!--\x1b[?1049h-->\r` and ending with `<!--\x1b[?1049l\x1b[3D\r`), and has the curl-able content appended to the end.
When you curl it, it still writes the HTML to your terminal, but immediately clears that buffer and writes the ANSI version to your real screen. In browsers, this ANSI stuff is hidden in an HTML comment. This is useful for static sites on GitHub pages or something.
G_o_D 21 hours ago [-]
Something like Emails ?
They can have both text and html version, its the client capabilities that determine what gets rendered like in cli mutt it will show text body, while gmail app/browser with rich documemt capability can render html
gfody 18 hours ago [-]
email clients support multipart/mixed, browsers never saw the need
bandie91 1 hours ago [-]
The `Accept:´ request header is kinda for selecting representation format for the same resoure.
classictraffic 1 days ago [-]
Fun! I also did something similar with my personal website this summer:
- `curl listening.cailinpitt.com` shows what music I've been listening to recently
- `curl reading.cailinpitt.com` shows what books and articles I've been reading recently
frangonf 1 days ago [-]
hey that's pretty curl
nullsanity 22 hours ago [-]
[dead]
tinthedev 13 hours ago [-]
I've found a bit less fun, but similar, way to present for the CLI. `curl -L tinthe.dev` is HTML, don't see why to mess with the default.
But, I did put in `<link rel="alternate" type="text/markdown" href="/home.md" title="...">` as a hint for using `Accept: text/markdown` on the same URL. Or going to .md versions of pages. Did it in a "sprint" of optimizing for other devices, screen readers, and LLMs. It is supported on the full page, posts included. Same point as the draft preview, less color.
Gets you 95% of the way there. The agents can take the .md and skip the layout. And I think `curl -LH "Accept: text/markdown" tinthe.dev` is pretty readable, too.
jayknight 1 days ago [-]
>If you were just trying to download the original HTML version of this page, add -H "X-Original: true" to the curl command to have the server respond exactly how it would've to any non-curl HTTP client.
It seems like "Accept: text/html" would be more standard
Yeah, I like this more. I want curl/wget to get the canonical representation by default.
ximm 17 hours ago [-]
But it is really up to the author to decide what "canonical" is. I serve my blog in markdown by default and only switch to html when it is explicitly requested.
basilikum 23 hours ago [-]
text/x-ansi is real? Wild
bingo-bongo 17 hours ago [-]
You can use whatever name you like and the “x-“ indicates it’s experimental.
An RFC exists that discourages the “x-“ naming, but it’s still very much in use in the wild.
basilikum 6 hours ago [-]
Yeah, but I mean I made a search for it and it's a non official MIME type but OC did not make it up in the comment. It seems to be in sparing use.
bitbasher 3 hours ago [-]
> ... I'll have you know that my markup language has had an explicit markup element for emdashes since November 2022.
You mean like, — in HTML?
bandie91 1 hours ago [-]
i hope it's not the dedicated Unicode EM DASH —
abound 19 hours ago [-]
Funny timing! I just set up wthr.dev (a domain I've had for a while) like this, modeled off of wttr.in, but with simpler output. Usage is like:
curl https://wthr.dev/Washington,DC
The geocoding heuristics can be a bit wonky, but it works decent.
(also I have comically strict rate limits in place, so you probably don't want to use this. it's also running out of my basement)
14 hours ago [-]
Rohansi 1 days ago [-]
FYI it works just fine on Windows if you run it from Terminal instead. As long as you don't use PowerShell mode in it.
zanderwohl 1 days ago [-]
I think these are very fun and I would love to see more content you can visit with curl. I'm setting up a home chores + calendar + weather station that runs off my homeserver. I was contemplating making a plaintext version so very stupid devices could still read and display interesting data.
IncRnd 1 days ago [-]
Also germane today a fix for curl/libcurl was released. The main vulnerability hinges upon using a malicious server to attack the client.
Does it help make your website more accessible to agents browsing the web?
bawolff 23 hours ago [-]
unlikely
djriley 1 days ago [-]
Awesome! I always wanted to try browsing the web like RMS ;)
pizzaiolo 1 days ago [-]
Jokes aside, RMS browses the web on GNU IceCat (Firefox fork), with the LibreJS extension on
mediumsmart 18 hours ago [-]
I have the Extended Support Release 115.17.0esr (64-bit) GNU IceCat gnu - 1.0 on my old intel mac and the nytpu.com displays fine, HN does too with hn.js blocked by LibreJS
Good Browser.
treykeown 1 days ago [-]
Not quite the same, but shameless plug for my polyglot website with a `curl | sh` mode: https://trey.sh
chengjunsuger 17 hours ago [-]
It's not available on Windows :( Can't open cause I use Windows.
When you curl it, it still writes the HTML to your terminal, but immediately clears that buffer and writes the ANSI version to your real screen. In browsers, this ANSI stuff is hidden in an HTML comment. This is useful for static sites on GitHub pages or something.
- `curl listening.cailinpitt.com` shows what music I've been listening to recently
- `curl reading.cailinpitt.com` shows what books and articles I've been reading recently
But, I did put in `<link rel="alternate" type="text/markdown" href="/home.md" title="...">` as a hint for using `Accept: text/markdown` on the same URL. Or going to .md versions of pages. Did it in a "sprint" of optimizing for other devices, screen readers, and LLMs. It is supported on the full page, posts included. Same point as the draft preview, less color.
Gets you 95% of the way there. The agents can take the .md and skip the layout. And I think `curl -LH "Accept: text/markdown" tinthe.dev` is pretty readable, too.
It seems like "Accept: text/html" would be more standard
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/...
... and then use `text/x-ansi` as the curl version, so other text-based clients could also fetch it:
wget -O - --header='Accept: text/x-ansi' nytpu.com/gemlog/2026-03-18
See: https://www.digipres.org/formats/sources/wikidata/formats/#q...
An RFC exists that discourages the “x-“ naming, but it’s still very much in use in the wild.
You mean like, — in HTML?
(also I have comically strict rate limits in place, so you probably don't want to use this. it's also running out of my basement)
CVE-2026-92392
https://daniel.haxx.se/blog/2026/10/07/twenty-two-pending-cu...
I made https://addr.fyi to return various information about IP addresses in plaintext.
https://en.wikipedia.org/wiki/Finger_(protocol)
Good Browser.