Caching problem when swapping between different sites?

I’ll mention what I was going to say in case the thread goes stale.

I’m constantly switching back and forth between sites in development. I may use the port flag if I’m running more than one at a time (though, actually, the Hugo server does this for you automatically, even without the flag), but I’ve never seen this problem on localhost:1313 when running a fresh cache. I think the original poster’s issue is with browser cache.

So, the simplest answer is to run your localhost sites in a non-cached browser tab. So, for Chrome that’s Incognito/private mode, or, better yet, in the dev tools settings you can check “Disable cache (while DevTools is open)” and just “cmd-option i” and leave it in another window, which is handy anyway. Other browsers have similar settings.

FWIW, I also use Chrome Canary as my dev browser (Firefox has a dev browser, too), so it’s pretty seamless.

I hope that’s helpful. I think there’s plenty here to answer the question.

3 Likes