TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Open Source Visitor.js

198 点作者 codejoust超过 13 年前

24 条评论

memnips超过 13 年前
It is now apparently Session.js <a href="https://github.com/codejoust/session.js" rel="nofollow">https://github.com/codejoust/session.js</a>
bradly超过 13 年前
Here is a live demo showing your own information. <a href="http://visitorjs.herokuapp.com/" rel="nofollow">http://visitorjs.herokuapp.com/</a><p>Fyi: I am not storing the information.
评论 #3435839 未加载
dsl超过 13 年前
Damn, you beat me to it. After I saw the original visitor.js was a paid service (which blew my mind), I started hacking together the JS implementations of most of the functionality I had laying around already.
gojomo超过 13 年前
The original visitor.js identified my city correctly; this only put me in the USA.<p>Is there a free reliable precise geolocation service that can take as many hits as a script like this could throw at it?
评论 #3436328 未加载
评论 #3436393 未加载
评论 #3436199 未加载
评论 #3436189 未加载
评论 #3435975 未加载
peteretep超过 13 年前
I'm glad you've done this, because I'd have wasted a few hours on it I didn't have otherwise :-)
tonywebster超过 13 年前
I love when disruption disrupts disruption.
grantjgordon超过 13 年前
I don't think there are any ethical issues here. The paid service is doing something that was mostly, if not completely, available in other open source projects such as piwik and OWA in the first place. It's very educational to look at the differences in the way codejoust implemented his javascript vs. these other projects, and very convenient that you don't have to dig through a gigantor open source code base to do it.
slavin超过 13 年前
I don't understand the pricing model behind visitorjs, and we had to implement a similar solution at my company. But the fact is - they created something and shared it here. If you think you can do a better job at it - fine, but why haven't you done it before, or at the very least named it differently. I don't mean to exaggerate, but it just doesn't feel ethical to me.
DannyPage超过 13 年前
What are the ethical concerns about using this and storing the data? If I wanted to use this on my site, should I let visitors know, or is this data fair game to store? I rather not use the location data (or any of it) if there could be an issue.
评论 #3437241 未加载
评论 #3437710 未加载
Flimm超过 13 年前
Is this version created or endorsed by the authors of the other Visitor.js implementation?
评论 #3435654 未加载
latchkey超过 13 年前
The best part about this whole thing is the location lookup. Seriously nice job.
josscrowcroft超过 13 年前
I'm super impressed you turned this out so quickly. I think that really sums up the spirit in the HN community...<p>When you look at something that seems overpriced (or wrongly-priced) and you say "hey, I bet I could do this"<p>I still see value in potentially paying for a service like this when it's a big enough pain-point. But I really think they'd have had more traction with a open-source-to-paid model, where anyone can use the client-side code for free, but the extra stats and support provided are worth paying for.
mise超过 13 年前
Having a "first session" and "current session" exposes very interesting functionality. It suddenly provides a quick way to keep track of what search keywords they used to get to the site, and could be later linked to an account if later created.
sbarre超过 13 年前
location is either "null" or "err/google" for me all the time.<p>Although I am probably an edge-case, I'm tethering from an iPhone on Rogers in Canada.<p>Visitor.js (the paid service) correctly positions me in Toronto, Canada though.
评论 #3437177 未加载
wehriam超过 13 年前
Outstanding! I also was going to have to re-implement this.
dchuk超过 13 年前
well...that didn't take long
jpulgarin超过 13 年前
Localization doesn't seem to work very well. I'm in Waterloo, Canada. This is what the script outputs for me:<p>&#62; session.locale.country<p>"US"<p>&#62; session.locale.location<p>undefined
评论 #3436624 未加载
评论 #3436497 未加载
kmax12超过 13 年前
where's the server stuff? is google providing everything that the pay service did, but for free?
评论 #3435627 未加载
tomhallett超过 13 年前
i'm curious about the timing here.<p>did you see vistor.js hit HN and rewrite it in a few hours? or were you working on this in isolation and when you saw it on HN decided it was the perfect time to ship?
评论 #3435765 未加载
评论 #3435693 未加载
dlitz超过 13 年前
Visitor.js should be the new FizzBuzz
desireco42超过 13 年前
The only thing that would make this better is to have it in coffeescript... :) which I might do for you if you don't.
评论 #3436359 未加载
alpb超过 13 年前
Gives 404?
评论 #3435772 未加载
buremba超过 13 年前
404?
评论 #3435767 未加载
necenzurat超过 13 年前
after reading visitorjs.com thread i asked myself WHY<p>Question: who would pay 10 bucks a month for using a js file for 30K requests?
评论 #3436995 未加载