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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Why do most sites still not track state well?

1 点作者 DATACOMMANDER超过 5 年前
I have a bit of frontend experience and a general understanding of how backends work, but I guess the &quot;glue&quot; layer between them must be more difficult than I think. Why is it that when I need to reset a password, or log in or out, the site that I&#x27;m interacting with is unable to handle even basic state? I&#x27;m not blocking cookies, so it can&#x27;t be that.<p>Can&#x27;t the page&#x2F;endpoint that I left in order to reset my password be encoded into the password-reset URL, so that after my password has been reset I&#x27;m brought back to where I was?<p>Password resets aren&#x27;t the only manifestation of this, but they&#x27;re the most obvious.

1 comment

PaulHoule超过 5 年前
I built a user management system circa 2001 that kept state across login and other events using the method you suggest. It even could save POST contents around a login.<p>I used it for a few web sites that cumulatively had 500,000+ members, open sourced it, didn&#x27;t get any interest from anyone else. My system was mostly written in PHP, but the actual cookie handling module could be coded up in about 50 lines of code and I ported it to Perl, Java, Cold Fusion and a few other languages.<p>My viewpoint at the time was that user management was the central service behind a &quot;portal&quot; web site, that is, you would log into Yahoo once and what bound it all together was they you had one login. In contrast to &quot;PHPNuke&quot; which was one huge application that had half-baked implementations of different services, you could pick best of breed applications and tie them into the auth system.<p>At the time there was a lot of code reuse in terms of applications (WordPress) and there were a few proto-frameworks like Struts, but Ruby-on-Rails was the first web framework that was transformational.<p>User management libraries didn&#x27;t catch on until federated login came along.<p>I think today people are often ignorant and wouldn&#x27;t care a bit about user experience if somebody wasn&#x27;t threatening that something awful was going to happen if their site wasn&#x27;t accessible. Half of the job of the W3C is normalizing deviance by not standing up against the pop-in windows that harass you everywhere on the web the same way those shoes you saw on Zappos five years ago are still following you around.<p>On the other hand, my priorities have always been different from other people. I&#x27;ve never bolted pagination onto a user interface after the fact. I have tried to parallelize something without chunking the work (to reduce overhead so it actually speeds up) but that was a n00b mistake 20 years ago -- people write these blog posts where they make it sound like Actors or some other shiny new thing is the key thing and no, you&#x27;ll have to chunk no matter how you do it. (e.g. is more fundamental!)
评论 #21648750 未加载