---
title: "Why .NET Core MVC Page Not Refreshing?"  
description: "Why .NET Core MVC Page Not Refreshing?"  
author: "Utpal Vishwas"  
published: 2023-07-06  
updated: 2023-07-07  
canonical: https://www.mindstick.com/forum/158980/why-dot-net-core-mvc-page-not-refreshing  
category: ".net core"  
tags: ["asp.net", "asp.net core", ".net core"]  
reading_time: 2 minutes  

---

# Why .NET Core MVC Page Not Refreshing?

Why .NET Core [MVC](https://www.mindstick.com/forum/155803/define-cache-profile-in-mvc) [Page](https://www.mindstick.com/articles/13031/why-to-make-a-wikipedia-page) Not Refreshing?

## Replies

### Reply by Aryan Kumar

There are a few reasons why a .NET Core MVC page might not refresh.

- **The page is not using runtime compilation.** In .NET Core 3.0, runtime compilation was removed by default. This means that changes to your views will not be reflected in the browser unless you restart the application. To enable runtime compilation, you can add the `Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation` NuGet package to your project and then add the following code to your Startup.cs file:

C#

```plaintext
services.AddControllersWithViews().AddRazorRuntimeCompilation();
```

- **The page is using a static file.** If the page you are trying to refresh is using a static file, such as an image or a CSS file, you will need to restart the application for the changes to take effect.
- **The page is using a caching mechanism.** Some caching mechanisms, such as the `OutputCache` directive, can prevent pages from refreshing even if the underlying code or data has changed. If you are using a caching mechanism, you will need to disable it for the page you are trying to refresh.
- **The page is using a third-party library.** Some third-party libraries can also prevent pages from refreshing. If you are using a third-party library, you will need to check the library's documentation to see if it has any specific requirements for refreshing pages.

If you have checked all of the above and your page is still not refreshing, you can try the following:

- **Clear your browser's cache.** This will remove any cached copies of the page from your browser.
- **Restart your browser.** This will also remove any cached copies of the page from your browser.
- **Restart your computer.** This is a more drastic step, but it may be necessary if the problem is caused by a deeper issue.

If you have tried all of the above and you are still having problems, you can ask for help on a forum or from a developer community.


---

Original Source: https://www.mindstick.com/forum/158980/why-dot-net-core-mvc-page-not-refreshing

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
