Open Closed

Blazor WebApp ABP v9 - Page reloads CSS/JS twice before usable #9130


User avatar
0
thanhlg created

Hi ABP team,

I'm using ABP Framework v9 with Blazor Web App. When I open the app in the browser, it loads the page, then reloads CSS and JS a second time before the app becomes usable.

This happens even with a new project from ABP Studio, without any custom changes.

I’ve attached a short GIF below showing the issue.

Can you help check if this is a known issue or how to fix it?

Thanks.
BlazorWebApp_ABP.gif


5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Yes. This is how webapp initital

    First blazor server. Then download wasm file in the background. Next time refresh page will switch to wasm

    This process will take a few seconds to initialize wasm.

    Thanks.

  • User Avatar
    0
    thanhlg created

    hi

    Yes. This is how webapp initital

    First blazor server. Then download wasm file in the background. Next time refresh page will switch to wasm

    This process will take a few seconds to initialize wasm.

    Thanks.

    Thanks for the info.

    To improve UX (some users think it's a bug), I want to show a loading screen and hide it only when all resources are fully loaded and the app is ready to use.

    Is there a way in ABP to detect that? Can you provide an example?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The page will always freeze for a few seconds.

    You can consider always using server or wasm mode.

    Change all @rendermode="InteractiveAuto" in App.razor file.

    @rendermode="InteractiveServer"
    or
    @rendermode="new InteractiveWebAssemblyRenderMode(prerender: false)"

  • User Avatar
    0
    thanhlg created

    Hi, I noticed that when the web app starts, it calls api/abp/api-definition, which is quite heavy and causes slow loading. Is there any way to improve or optimize this?

    image.png

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please enable the debug logs of API website and share the full request and response logs.
    We can check why the API took 2.43s.

    https://abp.io/support/questions/8622/How-to-enable-Debug-logs-for-troubleshoot-problems

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 16, 2025, 12:13