How long will the container_*.js file be cached for?
If you’re using Matomo Self-Hosted, the cache duration depends on how your web server (hosting Matomo) is configured. See below for how to check the current value in your web server.
If you’re using the Matomo Cloud service, then the container files are cached for 8 days on visitors browsers.
This means that after you make a change to the container, it will take up to 8 days for the file to refresh in returning visitors’ browsers.
Checking how long your container files are cached for
You can manually check how long the container files are cached for, by using the Developer Tools panel in your browser, and going to the « Network » panel, and searching for « container ». You can then click on the container_*******.js file, and check the « Cache-control » header (where the value is the file cache duration in seconds).
For example on Firefox here is what it looks like on a Matomo instance where the cache is set to 8 days: