What is the best way to update web app builder for the end user? When I put out a new version of WAB I don't want to have the end user clear their cache (most don't know how or will forget). Is there a snipit of code to place in the html file or something that will tell the browser to get the latest version?
-Stan
Solved! Go to Solution.
Hello Florian,
If you wish to test it just add it on an application by application basis.
If you find it works as you expect you can add it to the "stemapp" and it should get copied over for every application you create.
Generally speaking, it just appends a date onto the HTTP Request URL to trick the browser into thinking it's a new file.
If you know how to use your browser debugger you can preview it live in our map.
Andrew
Yes, I tried it and it worked well (Speaking of that, thank you for this trick!), but I would like to understand two things :
- First, if you concate the filename with the date, does it mean that your file don't gonna be updated two time in the same day ?
- Second, do you know/imagine the limits/risks of this manipulation ? Why it doesn't work with the WAB 1.3 ?
Thank you
Florian
Florian,
To answer your questions...
Hope that helps answer your questions.
Andrew
Andrew,
Yeah I understand the timestamp format that allow us to generate an unique ID but by my side it make something like this :
Yes that is correct when the site is loaded on a domain that is NOT the one defined in the myHostName variable.
I had to do this because I was not able to debug files in the browser if the file name was changing every time I reloaded the app.
If the site is running on the host name defined in myHostName it should look similar to the image I posted originally.
Hope that makes sense.
Andrew
Oh sorry ! I just understood my mistake ! I didn't take care that it was the domain and not the complete URL !
Thank you very much for your help !
Ya, that part makes it a little confusing but its needed to be able to debug in chrome or else chrome thinks it's a new file each time and all your break points no longer load.
If I do another version make I can make it automatic where I look for port :3344 to detect if its dev or not. we will see
Glad it's working well for you.
Andrew