Starts in:
0 DAY
13 HRS
24 MIN
47 SEC
Starts in:
0 D
13 H
24 M
47 S
Open Closed

global.js and css file twice on initial load need a quick solution for it #3897


User avatar
0
Naren created

*Hi Abp Team, We Are Coming across Some issue regarding page Load Time We found On our intial Load two times the global.Js and Css been Loaded We had used abp bundle in our project

  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

6 Answer(s)
  • User Avatar
    1
    mahmut.gundogdu created

    Would you describe your version and which UI type you used? (Angular, MVC or blazor)

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Do you use Blazor Wasm or Blazor Server?

  • User Avatar
    0
    Naren created

    Hi, we are usig Abp5.3 on .net 6 with a Blazor Web Assembly

    For the time load it loads index then point to login and then reloads index which is fine. But for every refresh even after login from browser, it goes to login-call back internally and loads index.html twice.

    Our query is when user already logged it should straight load index page. Since index loaded twice, all the resources are loaded twice, this is impacting the performance on first load to the customer.

    Can you please help what setting needs to be changed?

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    I have investigated this issue and it's correct. global.js is initialized twice because authentication check should be done before rendering layout. It checks authentication state and initializes global.js after authentication check.

    It seems second one isn't downloaded from server, browser serves it from memory cache.

  • User Avatar
    0
    Naren created

    Hi Enisn,

    In developer machine it loads from memory cache\disc cache but in production both are downloaded from the server. You can even see a lag in millisecs

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    We're still investigating this issue. Since this is a kind of bug, your ticket has been refunded.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06