
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
It's unclear how a page with rendermode InteractiveAuto should behave.
The documentation appear to say that once the runtime is cached subsequent loads should use WebAssembly. However in practice the rendermode used appear to be depending on what the last visited page was using.
Expected Behavior
Once the runtime is cached, loading a page with rendermode InteractiveAuto should render it using WebAssembly.
Steps To Reproduce
Create 3 pages, one with their own rendermode: InteractiveAuto, InteractiveWebAssembly, InteractiveServer.
Add some code to the InteractiveAuto page indicating what mode it's using, for example @Directory.GetCurrentDirectory()
.
Load the page with InteractiveAuto, first time it is running on the server as expected.
Reload the page, now it's running in the client as expected.
Navigate to the InteractiveWebAssembly page and then back to the InteractiveAuto page, the page is still rendering in the client as expected.
Navigate to the InteractiveServer page and then back to the InteractiveAuto page. Now the InteractiveAuto page is running on the server.
It appears that whether an InteractiveAuto page is loading on the server or the client is based on whether the runtime is running or not, and the state of the runtime is started/stopped by visiting the InteractiveWebAssembly/InteractiveServer.
This it's not based on whether the runtime is cached or not.
Exceptions (if any)
No response
.NET Version
8.0.100