Skip to content

Bug: Hard reload not triggered when navigating from Interactive page to SSR page via browser back button #54574

@zubairkhakwani

Description

@zubairkhakwani

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When navigating from an Interactive page to a Server-Side Rendered (SSR) page in a Blazor web application, a hard reload is supposed to be triggered based on a check within the SSR layout file. This behavior works as expected when navigating through links or button clicks. However, if the user navigates from an Interactive page to an SSR page using the browser's back button, the hard reload mechanism fails to execute.

Additional Context

  1. The SSR page is located in the server project.
  2. The issue has been reproduced in a Blazor web app with identity using global interaction mode in Visual Studio template.

Expected Behavior

Upon navigating from an Interactive page to an SSR page, whether through direct navigation or via the browser's back button, the hard reload should be consistently triggered based on the HTTPContext check in the SSR layout file.

Steps To Reproduce

  1. Navigate from an SSR page to an Interactive page.
  2. Use the browser's back button to return to the previous SSR page.
  3. Observe that the hard reload mechanism is not triggered.

Steps to reproduce in Visual studio template project (Blazor Web App With Identity & Global Interaction)

  1. Create new project from Visual Studio template.
  2. Run the project
  3. Navigate to counter page
  4. Navigate to login page
  5. Now press browser back button

Exceptions (if any)

No response

.NET Version

8.0.200

Anything else?

bandicam 2024-03-17 11-24-56-347

Metadata

Metadata

Assignees

Labels

area-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions