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.

Ask HN: Why No Ajax in HN?

4 pointsby kp25almost 11 years ago
I Upvote a post,the vote count will not be updated. I should reload the page everytime to check the top post and also the number of votes. Why Ajax like techniques aren't employed in HN? Any Downsides of using it?

3 comments

tptacekalmost 11 years ago
I think one reason might be the &quot;framework level&quot; news.arc code, which does a continuation-passing-like thing for forms to create a sort of synchronous straight-line flow in the code without lots of callbacks. A side effect of that is that some of the code is very tightly coiled around the render-form post-form flow of a standard, 2001-era web application.<p>Another reason is that Graham simply seems a little allergic to Javascript. When you look at HN, think Rails 1 (they come from similar eras). Today, if you had an application like HN, you&#x27;d probably have a serverside that primarily provided a JSON HTTP API for a Javascript project that managed almost all the actual UX. But that wasn&#x27;t at all a normal way to design applications back when HN was first written.
chewxyalmost 11 years ago
Conversely, ask yourself the opposite question: what will happen if AJAX voting were enabled in HN?<p>- votes will be counted immediately, the number increase. Then what?<p>While this is good UX, would this be helpful in the entire context of HN? What if your vote were a ghost vote - i.e. your user account is a ghosted account? Should it show just for you? If so, you are adding a lot of complexity to the system. Why is such complexity needed?<p>Now, I can&#x27;t speak for dang and kogir, but I think it&#x27;s a rather good thing that the vote counts don&#x27;t increase immediately - prevents gaming
评论 #7963861 未加载
valarauca1almost 11 years ago
The honest to god answer is very simple. The website was made, and administered by pg (Paul Graham) directly. He was (until very recently), the only eyes on the code base, and the only maintainer. The code was sloppy, and generally un-reviewed. A lot of features didn&#x27;t exist because they didn&#x27;t exist when the site was started, or were just deemed unnecessary.<p>As of recently a new team has taken over, who before adding new features is porting the entire website over to a more maintainable code standard. New features are coming, just eventually.
评论 #7963707 未加载
评论 #7966139 未加载
评论 #7963690 未加载