balancednetwork / balanced-network-interface

An open-source interface for the Balanced Network protocol (https://balanced.network)
https://app.balanced.network/
22 stars 22 forks source link

Cache Buster #479

Open BennyOptions opened 3 years ago

BennyOptions commented 3 years ago

When we merge a PR to production, it would be good if cache of users is automatically updated. Sometimes we have crucial issues, and we don't want users to make mistakes because they have an old frontend.

@gedanziger please leave some comments if you know how to do this. We can have @WeiLi512 or @tuan-tl work on it when we have some time

avipatel91 commented 2 years ago

Are you using Vercel for CDN? I took a look at the docs and they state that they set cache to max-age=0 in response header for index.html. I further confirmed this by looking at the response header when visiting app.balanced.network. If that is set, then browser won't cache the index.html. No need to worry about caching busting rest of the static assets, considering the hashes sourced in the new index.html will refer to the new assets.