Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 4, 2025

Backport of #63544 to release/10.0

/cc @javiercn @maraf

[Blazor] Disable preloading for enhanced navigation

This PR disables generating preloading elements from ResourcePreloader when the HTTP request is for enhanced navigation.

Description

Enhanced navigation presents several challenges for preloading

  • DOM merging: Preloading elements may be different between pages which may result in different order, resulting in removing and adding elements, resulting in browser triggering more preload requests than necessary.
  • WebAssembly runtime state: When navigating between pages, WebAssembly is not restarting, only for the first page we need a preloading element.

This PR disables generating preloading elements from ResourcePreloader when the HTTP request is for enhanced navigation.
It alsore removes previous attempt to solve the DOM merging problem from #63239

Customer Impact

Customers won't get extra preload requests for resources that have already been loaded on previous page when doing enhanced navigation.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

@github-actions github-actions bot requested a review from a team as a code owner September 4, 2025 16:17
@maraf maraf added this to the 10.0-rc2 milestone Sep 4, 2025
@maraf maraf added the area-blazor Includes: Blazor, Razor Components label Sep 4, 2025
@maraf maraf self-assigned this Sep 4, 2025
@danmoseley
Copy link
Member

@lewing do you want to take this one?

@danmoseley danmoseley added the Servicing-approved Shiproom has approved the issue label Sep 11, 2025
@lewing lewing merged commit 758a478 into release/10.0 Sep 11, 2025
27 of 28 checks passed
@lewing lewing deleted the backport/pr-63544-to-release/10.0 branch September 11, 2025 17:35
@dotnet-policy-service dotnet-policy-service bot modified the milestone: 10.0-rc2 Sep 11, 2025
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 Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants