Hacker News new | ask | show | jobs
by WalterGR 1702 days ago
This happens to me. It may be related to hiding submissions, but I haven't verified that. I think what's going on is:

Do you click the "hide" links to hide submissions?

The visual hiding is done via Javascript when you're viewing a page. What seems to happen is that when you hit the back button, Safari asks HN if the page has changed, and HN says that it hasn't. This is untrue because you've hidden submissions. But because HN says it hasn't changed, Safari re-displays the page it has cached in memory and restores where the browser viewport was - but doesn't restore the DOM state, i.e. where your hidden submissions were 'recorded' in the browser.

Hence if you've hidden submissions above where the viewport was, when those submissions reappear, it pushes the subsequent submissions down, and the viewport ends up above where you'd expect it to.

There's no client-side solution for this.

1 comments

Thanks for your response. This happens to me whether or not I've collapsed any comments or hidden any posts. Frustrating, because I've tried it on a couple of friends' iPhones and their phones don't have the same problem.

It feels like some kind of issue with the response cache headers sent by the webserver, but since it's not reproducible on some phones or any desktop browser, that's unlikely.

Hmm… yeah nothing to do with hiding. Strange and annoying. :)