0

Whenever I make changes to files I am hosting for my website, like the CSS files, they never update. Even after deleting the original CSS files everywhere, using Chrome's inspect element still shows that the websites HTML is being styled by the "style.css" file that doesn't exist. The only way I have found around this is by changing the HTML pages to be styled by a "style2.css", and renaming my updated CSS file to "style2".

Is this not insanely weird? Ghost files? I'm not going crazy right?

Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109

1 Answers1

1

Try refreshing with CTRL+F5 instead of only F5 This will clear the already cached files like css and js and will reload the updated ones

Let's say you have style.css

with

.body{
background-color:white;
}

after that you change the same style.css file to

.body{
background-color:black;
}

sometimes the navigator won't read the new code in css/js and will load the old ones unless you clear them

This could be your problem, try it and check again

Or you could check out this case : How to force the browser to reload cached CSS and JavaScript files

YESSINE
  • 274
  • 1
  • 9