onaio / gisida

JavaScript library that converts MapSpec layers to beautiful, interactive maps using Mapbox GL
http://gisida.onalabs.org/
Apache License 2.0
10 stars 3 forks source link

Use versioning in assets that can easily get cached #465

Open ukanga opened 4 years ago

ukanga commented 4 years ago

If you change the logo or a CSV file and still use the same name for the asset, it may require a hard refresh or a clearing the cache before the change can be noticed.

If we version the resources such that when we switch logo-v1.png with logo-v2.png, when the site is redeployed the v2 logo will be immediately be reflected. And you do not have to provide instruction to users that they should hard refresh to see any changes.

We avoid the developer habits being transferred to the end-user.

kelvin-muchiri commented 4 years ago

@ukanga Yea agreed. We need to find ways to solve the caching. A hard refresh currently seems is required for changes deployed. For instance, opening https://cpims-cambodia.onalabs.org/ required a hard refresh in order to view the search bar on my end