Skip to content

Feat: Preserve form progress across page refresh using sessionStorage #97

Description

@Krishna-sm

Is your feature request related to a problem? Please describe.

Yes.

The profile generator is a multi-step form where users spend time filling in various details before generating their GitHub profile.

If the page is accidentally refreshed (or the browser reloads due to network issues, crashes, or an unintended refresh), the user is redirected back to the first step and all previously entered information is lost.

This creates a poor user experience, especially when users have already completed several steps, as they must re-enter everything from scratch.


Describe the solution you'd like

Persist the current form state in sessionStorage while the user is filling out the form.

On page refresh:

  • Restore the last active step.
  • Restore all previously entered form values.
  • Allow the user to continue exactly where they left off.

The stored data should be cleared when:

  • The profile is successfully generated.
  • The user explicitly resets the form or starts over.
  • The browser session ends (handled automatically by sessionStorage).

This would make the form much more resilient to accidental refreshes without requiring any backend changes.


Describe alternatives you've considered

  • localStorage could also preserve the form state, but it persists even after the browser is closed, which may leave outdated or unwanted data for returning users.
  • Keeping the current behavior requires users to manually re-enter all information after a refresh, resulting in unnecessary frustration and a poorer user experience.

Using sessionStorage provides a good balance by preserving progress only for the current browser session.


Additional context

User Story

As a user, I want my progress to be preserved if I accidentally refresh the page, so that I can continue editing my profile without losing all the information I have already entered.

Expected behavior

  • Refreshing the page restores the last active step.
  • Previously entered values are automatically restored.
  • Data is cleared after successful profile generation or when the user intentionally resets the form.

This enhancement would significantly improve the user experience for a long multi-step workflow while keeping the implementation lightweight and entirely client-side.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions