Hacker News new | past | comments | ask | show | jobs | submit login

This breaks the back-button for me, despite the author claiming otherwise.

Steps to replicate: 1. Visit article 2. Click on logo to go to the home page 3. Scroll down until more content gets loaded 4. Click back button

Expected behaviour: Get moved back to the article page Encountered behaviour: Still at front page, scrolled to the middle.

Using Safari 5.0.5, OS X 10.6.7




This seems like intended behavior. You back button is not broken. Clicking back brings you back to the previous page... that page just happens to seem to be part of the current page.

For you, it would seem best to remove the previous page content when adding the new content. That way pressing "back" will be super fast, page loading will be fast, and the web will still be happy.


Well then that's bad intended behaviour. The back button should reverse the loading of a new page after clicking a link. It should not interfere with scrolling at all.


Your comments echo many others. I've since changed the behavior to respect traditional back button usage. Hope this helps!


Great job!


It's interesting that there is no mention of BFCache anywhere in this article. This is one of those fantastic features that (although unfortunately not supported in Chrome) allows for very simple infinite scroll and use of the back button.

Unfortunately this guy's script takes it a little too far for browsers that DO support bfcache and unfortunately breaks functionality a bit, or at least makes it confusing, despite it being intended functionality or not.


I noticed that on Chrome in Snow Leopard, too. Guess it needs a little more tweaking!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: