0

currently, I am learning Bootstrap 4 at ASP.NET MVC project (only change index.cshtml, nothing else) in JetBrains Rider and I have some weird problem I can`t deal with.

Every day when I start to write new code in HTML it seems to be okay - dotnet watch run works great, inline styling is okay. But when I change site.css it doesn't see changes, I don't know why. After some time it fixes itself randomly (weird but ok), for example, yesterday I couldn't do anything with CSS until I ran the project in JetBrains Rider, but now it doesn't work. Two days ago it fixed itself when I wasn't using my computer (xD). Do you have any idea what's going on or how to fix it? I didn't find anything interesting on Google

P.S. I updated JetBrains IDE to the latest version but nothing is changed

0

1 Answer 1

2

Its browser-cache related. You should cache bust your css file ( add rand number or guid at the end of your css stylesheet declaration, ex : <link rel="stylesheet" href="style.css?v=3.4.1"> 3.4.1 should be generate randomly. ). Before doing that, you can also clear-cache or hard reload your page and you should see your changes.

Take a look at : https://css-tricks.com/strategies-for-cache-busting-css/

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.