CSS during hugo server loads cached version until I make change

I have a static/css/custom.css file in my project. I have stopped and started my hugo server several times, and here’s what happens:

  • I start hugo server (have tried with and without --disableFastRender) and I get an older version of the file loaded (from a few days ago).
  • I make some changes in the file, and all my recent changes become visible in the live reload.
  • I then refresh my page and all those changes disappear again.
  • I make a change and save the file and it all comes back
  • etc etc.

Is there some cached version of that files somewhere that hugo is falling back to? If not, what else might be happening? There is no public directory in my project currently.

Is the machine you are running your browser on the same as the server? If not, perhaps there is another cache somewhere.

Otherwise, have you tried doing a ctrl-F5 (or equivalent on your platform) to force the browser to invalidate its own cache? Sometimes you have to do that a few times.

OK, looks like I just didn’t know the proper keystroke for a hard browser refresh!

For anyone else out there, this was very simply fixed with a Ctrl + Shift + R in Chrome on Fedora.