B4J Question [BANano] How can one achieve a "client side" automatic app refresh in BANanoServer?

Mashiane

Expert
Licensed User
Longtime User
Hi there

With BANAnoServer use cases, one has to do a hard browser refresh during debug to see new changes. This also translates to the final app.

When an update is made on the server, usually the end users have an old version in their browser cache etc. One use case is to show a "New Version Available" label on a login screen etc.

Thing is this only works when end users do a refresh. Is it possible to avoid this and have an automated process that can ensure the latest version from the server is being used?

Thank you in advance.
 

Mashiane

Expert
Licensed User
Longtime User
1650446327018.png


This?
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
No, in your code, do you manually set server.AppVersion somewhere? By default this is DateTime.Now and is used to control the cache. Every time you recompile the app, this number will be used to check the 'If-None-Match' and set the ETag if needed which indicates to the browser to reload. Check the code of SERVERCacheControl.bas for the whole explanation.

This module was investigated and written by Mindful and has worked for us perfectly in ABM and BANano.

Maybe your server setup overrules this? (Apache, HAProxy or something alike)
 
Upvote 0
Top