Breadcrumb trails need to show the path you took
The problem with hierarchy-only breadcrumbs
You land on a product page from Google. The breadcrumb says Home > Electronics > Cameras > Model XYZ. You click "Cameras" expecting to return to the list you just saw — but you never saw that list. You came from search. The breadcrumb lied.
Most CMS breadcrumb plugins build the trail from content hierarchy: parent pages, categories, taxonomies. That works fine when users navigate top-down through your site structure. It breaks the moment someone arrives via search, email, social, or a direct link.
Users expect breadcrumbs to retrace their steps
Breadcrumbs are navigation, not a site map. When someone clicks a breadcrumb link, they expect to go back to something they've seen. If they landed on your page from an external search for "mirrorless cameras under $1000," showing them the unfiltered category page for all cameras feels like a bait-and-switch.
The hierarchy-based breadcrumb assumes a journey that never happened. It's technically accurate and functionally useless.
Session-aware breadcrumbs fix this
Store the user's last few page views in session state. When they land on a detail page, check whether they came from a list page on your site in the last few minutes. If yes, use that list page in the breadcrumb. If no, skip the middle tier and show only Home > Current Page, or add a "Back to search results" link if they came from your internal search.
This isn't complicated. Most analytics tools already track this. Your breadcrumb just needs to read it.
Fallback to hierarchy when there's no session path
First-time visitors and cold arrivals still need breadcrumbs. When you don't have a session path, default to the hierarchy-based trail. It's not perfect, but it's better than nothing, and it won't contradict what the user just experienced.
The trick is recognizing when to use which version. If document.referrer is external or empty, show hierarchy. If it's internal and matches a known list or index page, show the session path. Simple conditional logic.
Static sites can fake this with query parameters
No session state? Pass a ref parameter in list-to-detail links. When someone clicks through from /cameras?filter=mirrorless to /cameras/model-xyz, append ?ref=mirrorless. Your breadcrumb script reads that parameter and swaps "Cameras" for "Mirrorless Cameras" in the trail.
It won't survive a page refresh, but it works for the immediate click-through, which is when breadcrumbs matter most. Users who bookmark or share the link get the hierarchy-based fallback, which is fine — they're starting fresh anyway.
Test breadcrumbs from external entry points
Most breadcrumb QA happens by navigating from the homepage. That's the one scenario where hierarchy-based breadcrumbs work perfectly. Test from:
- Google search results for deep pages
- Email newsletter links to specific posts
- Social media shares of individual products
- Direct URL entry
If your breadcrumb trail makes sense in all those cases, you're done. If it only makes sense when users follow your intended site structure, it's decoration, not navigation.
Your category pages already define the hierarchy. Breadcrumbs should reflect the journey, not repeat the org chart.