How are the tile requests cached in web browser?

The responses from MapTiler servers contain a Cache-Control directive that instructs the web browser to cache the responses for a certain time period. If the user revisits the page in this time frame, the same requests to our servers will be resolved from the local cache and no new network request will be initiated.

However, MapTiler has no control over the client-side cache. There is no way to invalidate the cache in case the map/tileset changes.

The client’s browser may decide to cache or not to cache the data for various reasons (low disk space, privacy/incognito mode, etc.). In such cases, MapTiler is not able to influence this. Additionally, the browser usually ignores the cache on purpose while refreshing a page to make sure it gets the freshest possible content.

At the moment the browser cache TTL is 4 hours, so the customer will not be charged for repeated requests during this time frame. It can also take some time for all the changes to propagate to all your users.

For this reason, you can also experience the delay between publishing updated map styles and seeing the changes on your device. This can bypassed by purging or temporarily disabling the browser cache (for example in the browser developer tools).