-
Notifications
You must be signed in to change notification settings - Fork 17
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
The default fallback page is always loaded first, even if the browser's address bar indicates other paths. #17
Comments
I was able to reproduce the behavior reported by @fingers10. In my case, I deployed to Azure Static Web Apps service. My educated guess is that the flicker (the appearance of the index page) prior to the deep-linked page is an artifact of the virtual DOM rendering process. After the application starts, it starts to build the virtual DOM based on the index page at the root. This initial virtual DOM is than updated to match the deep-linked page. The video shows the index page before the second update has completed. It's much more apparent when you paste the deep-link into the address bar because
If you rapidly repeatedly hard refresh the page, the flicker is less reproducible. Based on @jsakamoto comments in #2, I removed the service worker and was not able to reproduce the flicker. There appears to be some interaction between the service worker and the rendering process. I'm now curious to see if this flicker appears when the application is hosted. I'll try an experiment and report back. 😄 |
@c0g1t8 I have tested what you have mentioned and confirm that this issue is because of the service worker. Thanks for the findings. Here is the non service worker url I used for testing - https://fingers10.github.io/WasmNonServiceWorkerPrerender/fetchdata/ I'm not a pro in service worker. I'm still in learning phase. Let's wait to hear from @jsakamoto on this. |
Hi everyone,
I attached the |
@jsakamoto, Thanks for the inputs and fix. Now the correct page is getting loaded. The flickering effect is minimal for simple screen - https://fingers10.github.io/WasmServerPrerender/fetchdata But obvious for the following URL - https://ilovedotnet.org/blogs/blazor-wasm-publishing-to-iis Here is the sample video. ObviousFlickerIssue.mp4 |
I figured out that the root reason for your last unexpected flickering effect is not this library. I attached the source code of the minimal ASP.NET Core hosted Blazor WebAssembly app that can reproduce this problem. And also, I deployed it on Azure Web Apps, so anybody can confirm this problem on the fly (The URL is below). I wrote a report document as below. Unfortunately, I have no idea how to resolve or work around this flickering problem, even though I spent a few days investigating it. 😥 Do you mind if I closed this issue with an "unresolved" status? |
@jsakamoto Many thanks for the detailed investigation. Can we report this to Microsoft in aspnet repo? Yes you can mark this as closed with unresolved status. |
Yes we can! I posted about this problem to the ASP.NET Core repository right now. And I also tweeted it. I'll appreciate it if you vote my issue comment and retweet my tweet above. |
@jsakamoto The fix provided in the Change the code inside the creates a cache issue. Steps:
Video showing the problem:
CacheProblem.mp4Please can we reopen this? |
No, you should not do that. The issue you reported is not suitable for this issue. (Please see also the title of this issue.) Instead, I open a new issue as the following. Please don't hesitate to open a new issue if the issue you want to post is not suitable for existing issues. Please be careful if you post any issues to a thread for n unsuitable theme carelessly, it will cause uncontrollable handling issues. |
From: @fingers10
(The original post is in the Issue #2)
@jsakamoto , I would like to understand more on flickering effect that occurs when prerendered site is loaded. Please can you assist me on this.
I have this repo - https://github.com/fingers10/WasmServerPrerender published to GitHub Pages using the below URL.
Here is the sample URL that I'm using for testing - https://fingers10.github.io/WasmServerPrerender/fetchdata
Steps I followed,
index.html
inwwwroot
loads and the actual page loads. Is this the expected behavior?index.html
inwwwroot
loads and the actual page loads. Is this the expected behavior?Here is the video showing the same.
ScreenRecorderProject6.mp4
Thank you for your support and teaching.
The text was updated successfully, but these errors were encountered: