4 ms·
Hoping to experiment with some of that soon. I implemented "x new comments" for Hacker New as a userscript [1]. Thinking of doing something similar by having n
by insin 12y ago
Hoping to experiment with some of that soon.
I implemented "x new comments" for Hacker New as a userscript [1]. Thinking of doing something similar by having new comments add themselves as "new" if you're already on a page and caching the max comment id seen in localStorage for when you revisit.
This API really needs something sitting with the websocket always open on the backend to do some caching, particularly for comment counts.
If top stories were being cached and data passed top-down rather than fetched individually as with this hack, you could even reuse the same React components to pre-render on the server.
[1] https://twitter.com/jbscript/status/462657449497874432/photo/1 https://twitter.com/jbscript/status/462657449497874432/photo...