Hacker Newsnew | past | comments | ask | show | jobs | submit | 98469056's commentslogin

rewriting the backend for https://voidchat.org in TypeScript. it was originally in c++, but i lost the entire codebase (wasn't using git) and figured i'd try something else. lesson learned (maybe)


thats the joke


It got me, I've seen this sort of suggestion made un-ironically enough that it seemed believable


I also assumed initially that it was serious, but upon reflection, "a modest proposal" is the educated man's /s.


I'm working on an anonymous chat site https://voidchat.org with the backend written entirely in C++. The only dependencies are libpq and uWebSockets, everything else is built from scratch


While peeking at the source, I noticed that the doctype declaration is missing a space. It currently reads <!doctypehtml>, but it should be <!doctype html>


`<!doctype html>` can be minified into `<!doctypehtml>`.

It’s, strictly speaking, invalid HTML, but it still successfully triggers standards mode.

See https://GitHub.com/kangax/html-minifier/pull/970 / https://HTML.spec.WHATWG.org/multipage/parsing.html#parse-er...

(I too use that trick on https://FreeSolitaire.win)


Why would you do this?


To have FreeSolitaire.win homepage be only 20.7 kB over the wire.

That’s for the whole game: graphics are inline SVGs, JS & CSS are embedded in <script> and <style> elements.


To be clear, you can minimize much further than what you already have. For example you haven't fully minified SVG, which can be also replaced with just symbol characters. Saving a single space from `<!doctype html>` is insignificant compared to that.


This would be another interesting story about web optimization if you wrote a post about it! :)


Right but surely skipping that space wasn't that much of a win


Sounds like this is from a minifier that removes as much as it can [0]

0: https://github.com/KTibow/KTibow/issues/3#issuecomment-23367...


Maybe their javascript adds it back in :)


Status page: Cloudflare is investigating issues with the Cloudflare Dashboard


We beat their status page by 10 minutes and downdetector by 5 minutes.


tachiyomi has fallen, billions must go outside


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

Search: