Reload tile(s) without caching

I have my own application which displays map tiles from openstreetmap. It save all downloaded tiles to locale cache on disk. Program has ability to manually reload tiles for current viewing area (for example, after I was edited map with JOSM).

I know that changed tiles rendered not immediately, but often during couple of minutes. Over a long period of time (minutes - hours) my application still downloads old tiles, although in browser openstreetmap.org already displays new tiles.

I tried to add random parameter (like ?rnd=123) to request and set Cache-Control: no-store header (although it is prohibited in Tile Usage Policy), but nothing changed and application still recieves cached tiles.

Sample of HTTP request:

Can anybody tell me what is wrong?

See Technical updates to the tile.openstreetmap.org service (OpenStreetMap.org Standard Layer) - #16 by pnorman

1 Like

Thank you for link. Does this mean I can do nothing to avoid caching in my application?

Nothing is a big word.

There are obviously a number of avenues from running your own tileserver to using a commercial tile service. Or you could for example use the vector tile service which afaik is not yet impacted by the policy change. Obviously that is unlikely to be a permanent solution because the fundamental issues don’t change just because the technology is different, actually it is likely worse.

Or you could try to convince the OWG that you warrant an exception. Though there’s no actual mechanism to apply for that yet.

It really depends on what your application is/is doing which avenue makes most sense.

It’s better with the OSMF vector tiles. If the CDN has a stale tile a fresh one is guaranteed to already be present on the backend server.

Also, there’s so many fewer tiles and much less on-demand CPU load so it’s just easier in general.

My point is more that the motivation to overuse the service is the same or worse, which at some future pot will result in a crackdown.

Unfortunately my application supports only raster (png/jpeg) tile format. Besides that it is not guaranteed that such restrictions won’t be applied in the future also to vector tiles