Why doesn't the style change even when I change site.css?

I tried to launch my first ASP.NET MVC program and wanted to change some parts of the project.

When I tried to change the background color of the page body, I went to the Site.css file and changed the color to #ffffff. When I rebuilt the program, the color remained the same, and I found out that the only way to change it is to delete it and load it back into the project.

It seems to me that I am missing something very simple, could you help me?

+3
source share
2 answers

Some browsers cache your CSS aggressively; you can perform a force update every time you make changes to your external stylesheet ( Ctrl+ F5or Ctrl+ Shift+ R).

This happened to me with my ASP.NET WebForms project the other day. As implied in the comments, IE is a well-known culprit for this kind of thing.

+9
source

I think it is cached by your browser. In our projects, we insert our css / js into the assembly after development to avoid such problems.

+1
source

Source: https://habr.com/ru/post/1795848/


All Articles