Skip to content

Navigation reload: Mention that soft reloads don't fire popstate #38229

Closed

Description

@noamr

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/Navigation/reload

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

See title, it should be noted that soft reloads (navigation.reload / location.reload) don't fire the popstate event.

What did you expect to see?

See above

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details

Activity

  1. added
    needs triage
    on Feb 19, 2025
  2. added
    help wanted
    and removed
    needs triage
    on Feb 19, 2025
  3. kb42 commented on Jul 18, 2025

    @kb42
    Contributor

    Is anyone else working on this? If not, I can take this issue

  4. noamr commented on Jul 21, 2025

    @noamr
    ContributorAuthor

    Is anyone else working on this? If not, I can take this issue

    Go for it

  5. hamishwillee commented on Dec 8, 2025

    @hamishwillee
    Collaborator

    Hi @noamr

    According to popstate event

    The popstate event of the Window interface is fired when the active history entry changes while the user navigates the session history. It changes the current history entry to that of the last page the user visited or, if history.pushState() has been used to add a history entry to the history stack, that history entry is used instead.

    Presumably a reload() simply loads the same page so the user hasn't traversed the history - there's no "pop". So why would anyone expect popstate to fire?

    If it is reasonable that people might expect it to fire, of course we should add a note. Just wondering if that is true. If it needs to happen I will take care of it as part of #42254

  6. noamr commented on Dec 8, 2025

    @noamr
    ContributorAuthor

    @hamishwillee
    I think people who use popstate might be surprised that it's fired for some soft navigations and not for others.
    This is OK, but a note can help with the confusion.

  7. hamishwillee commented on Dec 8, 2025

    @hamishwillee
    Collaborator

    Thanks @noamr. People get surprised by lots of things - if we documented everything that things don't do we'd have lots of cruft. It doesn't do any harm in this case IMO, but not a habit to get into.

    What I've done is added the note in #42303 but pointed out my issue with this. If the reviewer is strongly against then we'll close this issue - otherwise it will go in.

  8. noamr commented on Dec 9, 2025

    @noamr
    ContributorAuthor

    Thanks @noamr. People get surprised by lots of things - if we documented everything that things don't do we'd have lots of cruft. It doesn't do any harm in this case IMO, but not a habit to get into.

    What I've done is added the note in #42303 but pointed out my issue with this. If the reviewer is strongly against then we'll close this issue - otherwise it will go in.

    SG! I actually don't remember the discussion that had led me to opening the issue in the first place..

  9. hamishwillee commented on Dec 15, 2025

    @hamishwillee
    Collaborator

    It's going in - no arguments from the reviewer, and "does not harm". Thanks very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Content:WebAPIhelp wanted

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions