Blazor WASM Client loads files twice

Viewed 259

I create a new Blazor WASM Application in Visual Studio following these steps:

Create a new WASM Application

  1. Create a new Blazor WASM application.
  2. Check ASP.NET core.
  3. Check PWA.
  4. Setup individual user accounts.

Create a new database for the application

  1. Open the Package Manager Console in Visual Studio
  2. Update-Database.

Run the new Application

  1. Run the application.
  2. Register a new user.
  3. Log in with the new user.

Inspect the page

  1. Inspect the page in the browser.
  2. Look at the Network tab.
  3. Refresh the page.

Output

enter image description here


QUESTION: Why the double downloads? Can it be avoided?

You can see in the image above that many files are downloaded twice. The openid-configuration is even downloaded 4 times. And some of the requests are cancelled.

I am assuming that the index.html is downloaded first and then it goes to the login-callback which then redirects back. But I'm not sure if I understand and if the double downloads are absolutely necessary or can be solved somehow.

0 Answers
Related