0

I have been building a website for over a month now, nearly completed. All of a sudden, when I make a change to my style.css file, the change does not appear when I refresh the page in the browser.

The strange thing is that, if I make a copy of the file, called style_copy.css, and link to that and make changes, then the changes do appear in the browser.

Does anyone have a clue as to why this is occurring?

I am browsing on Google Chrome (94.0.4606.61) and editing in Visual Studio Code (1.61.0)

Thanks

3
  • 1
    Browsers cache stylesheets, did you try using a hard-refresh? ctrl-f5 or ctrl-shift-r? Commented Oct 8, 2021 at 16:13
  • 1
    Does this answer your question? Force browser to refresh CSS, JavaScript, etc Commented Oct 8, 2021 at 16:14
  • So you're saying that this only happens in Chrome? Not Firefox or Edge? Commented Oct 8, 2021 at 16:32

2 Answers 2

0

First, make sure the css file has been saved.

If the file is already saved, then the issue is most likely because your browser has cached (saved an old version of) the file.

Then, try restarting the browser to clear the cache.

Also, try waiting and reloading, the file will likely update by itself pretty soon.

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

Comments

0

Instead of restarting the browser, you could also hit CTRL + F5

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.