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

Weather Auto render #3

Closed
ipax77 opened this issue Aug 10, 2023 · 1 comment
Closed

Weather Auto render #3

ipax77 opened this issue Aug 10, 2023 · 1 comment

Comments

@ipax77
Copy link

ipax77 commented Aug 10, 2023

When trying to implement the Weather Page as Auto rendered GitHub the data is being loaded on the server every time. Is it possible to get rid of the initial Server load? Or where can I change the RenderMode.ServerPrerendered for the Server?

First load:

info: Net8BlazorAuto.Services.WeatherService[0]
      getting weather from Server - 2023-08-10 07:39:59
info: Net8BlazorAuto.Services.WeatherService[0]
      getting weather from Client - 2023-08-10 07:40:04

Second load:

info: Net8BlazorAuto.Services.WeatherService[0]
      getting weather from Server - 2023-08-10 07:46:49
info: Net8BlazorAuto.Services.WeatherService[0]
      getting weather from Client - 2023-08-10 07:46:50

First load with slow 3G Network:

info: Net8BlazorAuto.Services.WeatherService[0]
      getting weather from Server - 2023-08-10 07:42:16
info: Net8BlazorAuto.Services.WeatherService[0]
      getting weather from Server - 2023-08-10 07:42:24
@danroth27
Copy link
Owner

Hi @ipax77. The weather data will get loaded on the server as part of prerendering the page. If you want to turn off prerendering you can do that by setting the render mode to @rendermode="@(new ServerRenderMode(prerender: false))". We are also working to enable persisting the prerendered state so that it can be reused on the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants