3 ms·
This is a really cool hack. Is the source code available somewhere? I understand how the updates are showing up in my browser (using CSS ::before and never clos
by thesandlord 9y ago
This is a really cool hack. Is the source code available somewhere? I understand how the updates are showing up in my browser (using CSS ::before and never closing the connection), but can't figure out how the post works without refreshing the page. Can't view source because the page never actually finishes returning. I'm probably forgetting something basic.
- Felk 9y agoYou're forgetting about F12 :)
- deleted 9y ago[deleted]
- wybiral 9y agoThe POST requests do refresh the page for the poster. But not for the viewers. For everyone else it just streams the HTML to them using chunked encoding. It's written in Golang and hosted on a free Heroku instance. I'll probably upload the code somewhere after a bit.
- thesandlord 9y agoOh wow, I couldn't really notice the page refreshing at all... Nice job.
- wybiral 9y agoThanks. There's a subtle trick where new comments (from streamed updates) have a CSS animation but comments from the page reload don't. It seems to make it feel more seamless.