I have a set of breadcrumbs for a web site:

enter image description here


When a user clicks on these, should I trigger the browser's back button using JS? Back n times? Or should these be regular a tags that move forward.

Note: I'm using a script which adds itself to the a so that if there is no history (a page was bookmarked and gone to directly), then the regular link kicks in. This question assumes that there is history.

  • 3
    What happens if I follow a deep link? Are you going to send me back to my search results? This applies to links internal to the site too. Jan 8, 2016 at 1:26
  • What do you mean by deep link?
    – Kelderic
    Jan 8, 2016 at 2:52
  • 2
    It's mentioned in JonW answer, where user landed hierarchically 'deep' inside your site from direct Google search (you probably cover it with the 'no history' exception, by not considering non-internal history). But whatever method you use they violate the Principle of Least Surprise. Ooh, I'll check Dashboard (which trigger Back twice). Oh cool, I'll go back to previous page. Wait, I have to use Forward instead?. Or consider the apocalypse when I click a non breadcrumb link to Search, then clicking any other breadcrumb link, which won't work because it's triggering back instead.
    – Martheen
    Jan 8, 2016 at 5:06
  • Ah, yes I see. Yes that is why I have the history check, but you are correct in that it's not quite robust enough of a check. Even if we don't consider the external hits. If I am on the Search page, (second level), and then I go to another second level page via the main menu, then clicking on Dashboard breadcrumb could return to the Search page. Using history and triggering Back assumes that the user only goes downward. Moving sideways through the hierarchy breaks it.
    – Kelderic
    Jan 8, 2016 at 18:00

2 Answers 2


A breadcrumb is a hierarchical link, not a historic link. It shows the user the hierarchical position in the site, not a trail of where they've come from.

For example, the user could have landed on that page from a direct Google search, or from a link in the website footer. So a browser back button on clicking the breadcrumb 'Search' item would be pretty useless.

They are navigational links, so treat them as anchor links. No need to over complicate things with fancy JS here. And for accessibility you don't want the user being unable to use them just because the JS didn't render in their browser / screen reader for whatever reason.

  • 3
    Well as I said, it's an additional action. If JS is disabled or there is no browser history, the link behaves naturally. However, I think the point about hierarchical vs historical is significant. I hadn't really considered that.
    – Kelderic
    Jan 7, 2016 at 14:32
  • 3
    Simpler is always better, in general. Less code, less to go wrong, smaller filesizes...
    – JonW
    Jan 7, 2016 at 14:39
  • 6
    +1 for mentioning accessibility, doesn't happen enough
    – DasBeasto
    Jan 7, 2016 at 14:39
  • 2
    I have seen breadcrumb links used for history, but it never seemed very useful. Hierarchical is much better. Jan 8, 2016 at 6:59
  • So it's not recommended use breadcrumb if i want to use as Step 1 > Step 2 > Step X ? Jan 8, 2016 at 7:04

Even if you set your site up so that breadcrumb links are "history" rather than "hierarchy", you should make them normal links. Doing anything else violates the user expectation that, after clicking a link, the "back" button will "un-click" the link. Your proposed system makes it so that they need to click the forward button instead.

  • Hence me accepting the answer, yesterday, that says not to do that.
    – Kelderic
    Jan 8, 2016 at 21:42
  • 1
    Also, I did run some user tests actually. Yes the majority have the expectation that you'd assume, but here's the interesting thing. It wasn't 100%. Of 11 people tested, 4 expected that clicking on a breadcrumb higher in the hierarchy would be the same as going back, and 7 expected it to move forward as a next page. So while the majority do have the expectation that you mention, I was surprised that 36% don't. (In my very very limited survey)
    – Kelderic
    Jan 8, 2016 at 21:50
  • @AndyM I wonder, was there any relation to age? 'Cause I remember back in the early 2000s, I'd occasionally run across historical breadcrumbs that used cookies, which did use javascript to trigger going backwards
    – Izkata
    Jan 9, 2016 at 5:02
  • Of the 4, 3 were over the age of 50. Given the small sample size I'd hesitate to draw conclusions, but its an interesting thought.
    – Kelderic
    Jan 9, 2016 at 5:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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