Skip to content

Instant loading not allowing to go back to initial page #5023

@vedranmiletic

Description

@vedranmiletic

Context

No response

Bug description

Going back to a page via browser back button with Instant loading enabled in general works fine. However, going back via browser back button to the the first page that was loaded doesn't work. To illustrate the idea:

  • user types https://gaseri.org/en/ in the location bar (first page)
  • navigates to https://gaseri.org/en/introductory-presentation/ via the link in the navigation bar (second page)
  • navigates to https://gaseri.org/en/people/principal-investigator/ via the link in the navigation bar (third page)
  • user presses browser back button, goes from third to second page and URL https://gaseri.org/en/introductory-presentation/ and its contents load fine as expected
  • user presses browser back button, goes from second to first page and URL changes to https://gaseri.org/en/ in the location bar, but the contents of https://gaseri.org/en/introductory-presentation/ are still shown

This is just to illustrate what is working and what is not; my minimal example attached below has only two pages that reproduce the issue.

I tested latest versions of Firefox and Brave, same issue. Finally, this is a regression from introduced in 9.0.0b1 and later versions of Material for MkDocs; version 8.5.11 works fine.

Related links

Reproduction

example.zip

Steps to reproduce

  1. Run mkdocs serve
  2. Open http://127.0.0.1:8000/ in browser
  3. Click on link to Page 1
  4. Click back button in browser to go back to index page
  5. Browser keeps displaying the contents of Page 1

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open🏆 perfectIssue is of outstanding quality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions