interface
interface copied to clipboard
UI file versioning so that users don't have to hard refresh to get the latest UI
Is your feature request related to a problem? Please describe. Users should not need to refresh to get the latest version of the UI, it should happen automatically.
Describe the solution you'd like Include a unique ver?=param like a unix timestamp to scripts so the browser does not use the cache if there is a newer file.
It's simple and effective, here is an explanation : https://sebhastian.com/javascript-versioning/
Ideally users shouldn't have to hard refresh to get the latest version if possible.
Describe alternatives you've considered An update button similar to 1inch if versioning is not possible on IPFS hosting?
Additional context None
It's not the issue you think it is. The files are in fact versioned.
The issue here is not easily solvable as the app is hosted on ipfs and app.aave.com
is just a CNAME
to a public ipfs gateway (1inch in comparison is a centralized interface giving them a bit more flexibility).
The gateway is in control over the cache headers and it seems like they are set to max-age=86400
(1 day) so as the index.html
is cached on the client it will be stuck on the old version for 24h before a new index.html is loaded which will in turn request the new version.
There might be a way to work around this by setting a lower dns ttl @RoRu?
Ahh okay that makes sense.
However in the past we've had users that have needed to hard refresh due to still being on an old cached version even though the latest deployment was more than a day ago.
Would it be possible that even after the user is directed to the updated IPFS deployment that the browser still uses the locally cached index.html?
@RoRu Is this something that can be solved by switching gateway provider?
While perhaps on another gateway you might have a bit more control in the end users are accessing the app via arbitrary gateways.
I think a good way around this would e.g. be to add a version artifact which you could periodically ping - so you can ask the user to reload once it's outdated. A bit like OTA updates work.