Cache busting a deployed site #521
-
I'm having trouble getting changes to show up properly in a site that was already deployed. It's deployed on Apache and I have caching turned off on index.html and all xml files. I don't do much other work with Hugo, but for my React apps this is usually all that's needed. In Chrome I am seeing partial changes until I manually clear the cache, then I see all the changes I made as expected. Is there anything I am supposed to be configuring specifically for the theme or Hugo to handle this? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Chrome caches quite aggressively /that looks like standard Chrome behavior.
No, the default settings should do — see also Configure File Caches — unless your adding dynamic elements (like e.g. React or reading from json files). For example, for getdoks.org I'm using these settings to display the most recent Doks version of [caches]
[caches.getjson]
dir = ":cacheDir/:project"
maxAge = "10s" |
Beta Was this translation helpful? Give feedback.
Chrome caches quite aggressively /that looks like standard Chrome behavior.
No, the default settings should do — see also Configure File Caches — unless your adding dynamic elements (like e.g. React or reading from json files). For example, for getdoks.org I'm using these settings to display the most recent Doks version of
package.json
: