1

In single page applications many sites use hashbangs in the URL to implement navigation history.

However, I recently came across this site: https://design.google.com/form-2014

I scrolled to the bottom of the page to see all the sections, each section triggered a hash change. Then I hit my back button only to find it took me back one section. Since I had scrolled up and down a couple times I had to hit back 20+ times just to get out of the page.

This made me question, are you supposed to push each hash change state into navigation history or only changes that would normally constitute page changes. If I were just trying to go back one section I would likely find this implementation helpful but since I was trying to leave completely I found it annoying.

It is a Google page about a Design conference so I figured they must have a good reason for doing as they did.

  • The back button took me out in one click. Am I missing something here? – Adit Gupta Sep 1 '15 at 16:51
  • Did you scroll down through some of the sections first? I haven't test other browsers maybe its a bug.. – DasBeasto Sep 1 '15 at 16:52
  • Yes, scrolled through sections repeatedly. The back button still worked. – Adit Gupta Sep 1 '15 at 16:54
  • I just tested Chrome 44, IE10, and FF 38.2 and its taking multiple back clicks to exit. – DasBeasto Sep 1 '15 at 16:56
  • Checked in Firefox. And it's not working there. Behavior is exactly as you indicated. – Adit Gupta Sep 1 '15 at 16:56
2

Terrible design

This is a terrible design (and it doesn't even function properly - when you hit back the main content slides are mis-positioned within the scrollable viewport - and that's on Chrome!).

Navigation

Navigation is a user triggered action, and the back button provides the opposite action.

Clicking on a link or a button is a singular action and so is the back button.

Scrolling is continuous so it clearly doesn't map to the singular back function.

Conceptually, scrolling and navigation could not have been further apart (the former is about content change, the latter about view change). But, alas, in-page anchors complicate things.

Yet, if you choose to navigate somewhere by clicking on a link and as a result the page scrolls - that's fine, you still have initiated the change and this stays in your working memory. But the expected result of scrolling is simply for the page to scroll - you do not deliberately navigate to this section or another.

Which leaves us with a more sensible implementation, like that on bootstrap pages.

  • Well put, I knew it seemed wrong but couldn't put reasoning behind it. And that Bootstrap implementation is much cleaner. – DasBeasto Sep 2 '15 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.