Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
zubairkhakwani opened this issue Mar 17, 2024 · 0 comments · Fixed by #54877
Closed
1 task done
Assignees
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug.
Milestone

Comments

@zubairkhakwani
Copy link

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

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Mar 17, 2024
@mkArtakMSFT mkArtakMSFT added investigate bug This issue describes a behavior which is not expected - a bug. and removed investigate labels Mar 20, 2024
@mkArtakMSFT mkArtakMSFT modified the milestones: 9.0-preview5, 8.0.x Mar 20, 2024
@halter73 halter73 modified the milestones: 8.0.x, 9.0-preview5 May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants