TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Real Time Users – Add a real-time user counter to your site

57 pointsby fredrivettalmost 9 years ago

9 comments

nevi-mealmost 9 years ago
Why not just use websockets? I use socket.io on my site. I keep track of socket IDs in memory, if a connection is lost, I get a disconnect event, and vice versa. Socket events are sent to users when the number changes.<p>I manage the frequency of socket emits using RxJS, to prevent sending too many changes to users.<p><a href="https:&#x2F;&#x2F;movinggauteng.co.za" rel="nofollow">https:&#x2F;&#x2F;movinggauteng.co.za</a>, there&#x27;s a counter at the top of the page.<p>EDIT: Only saw a comment about why the OP used Ajax after posting this.
评论 #11873480 未加载
评论 #11873326 未加载
subiealmost 9 years ago
Is using ajax calls on a loop the best way to track users on a site? I&#x27;m curious because when I look at pages using google analytics I don&#x27;t see any repeating requests in the network console. Does google mask the requests or use some other protocol?
评论 #11870296 未加载
Olscorealmost 9 years ago
Bringing hit counters back in fashion, eh?
评论 #11868784 未加载
fredrivettalmost 9 years ago
Hey all.<p>Last week Marc Kohlbrugge launched <a href="https:&#x2F;&#x2F;highscore.money&#x2F;" rel="nofollow">https:&#x2F;&#x2F;highscore.money&#x2F;</a>. Following that, he sent out a tweet, asking if anyone knew of a good real time user counter to add to his site.<p><a href="https:&#x2F;&#x2F;twitter.com&#x2F;marckohlbrugge&#x2F;status&#x2F;737388891246891008" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;marckohlbrugge&#x2F;status&#x2F;737388891246891008</a><p>No-one did, so we made one.<p>Real Time Users is just that. We made it this weekend. I wrote a quick post introducing it, so feel free to look at that for more details.<p><a href="https:&#x2F;&#x2F;blog.wearecontrast.com&#x2F;make-stuff-ff82f78cf5a9#.s8mggqigh" rel="nofollow">https:&#x2F;&#x2F;blog.wearecontrast.com&#x2F;make-stuff-ff82f78cf5a9#.s8mg...</a><p>Feel free to ask any questions, I&#x27;ll be about all day.
codepiealmost 9 years ago
Is it just me or this website is heavy on CPU? Increased my CPU usage by 50%.
评论 #11870016 未加载
评论 #11872315 未加载
pech0rinalmost 9 years ago
<a href="https:&#x2F;&#x2F;bycontrast.co&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bycontrast.co&#x2F;</a> is just a &quot;hello world&quot;, is there a normal site for that
评论 #11871100 未加载
shujitoalmost 9 years ago
What&#x27;s the backend made of?
评论 #11870415 未加载
llamatabootalmost 9 years ago
No link to the code on github? (or gitlab or wherever?)
评论 #11871829 未加载
Gysalmost 9 years ago
So actually nobody bothered to Google for that ?<p><a href="https:&#x2F;&#x2F;www.google.com&#x2F;search?q=user+counter" rel="nofollow">https:&#x2F;&#x2F;www.google.com&#x2F;search?q=user+counter</a> brings many websites offering this in various fonts, sizes and colors.<p>But then again, &#x27;good&#x27; can be very subjective...
评论 #11870444 未加载
评论 #11869490 未加载
评论 #11870098 未加载