Share via

General Question about MVC Core View reload Behavior

Corey Fleig 450 Reputation points
2026-02-26T00:05:47.1233333+00:00

Just a basic question, and lets say the following is done on purpose:

  1. The app loads a view with a custom layout, images, and a button
  2. The user clicks the button, one image changes, and then the same exact view gets loaded again.

Does the app truly actually re-load the entire contents of the view, layout, images, changed image, etc. or does the app just refresh the one image?

I just want to be clear on what gets repainted onscreen.

Developer technologies | .NET | Entity Framework Core
{count} votes

Answer accepted by question author
  1. Bruce (SqlWork.com) 83,581 Reputation points Volunteer Moderator
    2026-02-26T17:01:47.74+00:00

    Browser http processing is a request / response. The browser sends a request, either a get via the address bar, link or form post method get, or it is a post via a standard form post. The server processes the request and returns a response. The browser unloads the current document and loads the new response. There is a target option that loads the response in a new tab instead of replacing the current document.

    Even if the response exactly matches the current document, a complete reload is done and a new document is created.

    as suggested the only way to do partial updates to the current document is to use JavaScript and Ajax. MVC actions support partial views so that html fragments can be returned instead of the complete page to Ajax calls.


Answer accepted by question author
  1. Jack Dang (WICLOUD CORPORATION) 14,955 Reputation points Microsoft External Staff Moderator
    2026-02-26T04:09:04.8566667+00:00

    Hi @Corey Fleig ,

    Thanks for reaching out.

    In an ASP.NET Core MVC app, when you return a View from a controller action, the server generates the entire HTML for that page - including the layout, all images, scripts, and everything else - and sends it back to the browser as a full response.

    So if your button click results in a normal request that returns the same View again, the browser treats it as a brand-new page load. That means:

    • The whole HTML document is reprocessed.
    • The layout is rendered again.
    • All images are referenced again (although the browser may load them from cache instead of downloading them again).
    • The screen is effectively repainted as a full page refresh.

    Even if only one image changed, the browser doesn’t “know” that at a visual level, it simply replaces the entire document with the new one it received.

    Now, if instead you were using something like AJAX, partial views, or client-side JavaScript to update just the image source, then only that specific DOM element would change and the rest of the page would stay as-is. But in standard MVC request/response flow, it’s a full reload.

    Hope this helps! If my answer was helpful - kindly follow the instructions here so others with the same problem can benefit as well.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.