VL for Web: downloading latest version of RP javascript when using *CREATE_FROM.

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
andrewhiom
Posts: 12
Joined: Wed May 11, 2016 10:52 am

VL for Web: downloading latest version of RP javascript when using *CREATE_FROM.

Post by andrewhiom »

hi,

i have written my own VL for Web framework application that uses SET_REF *CREATE_FROM to instantiate parts.

in a scenario where reusable part 'P' is being instantiated within the framework's webpage 'W' using this method (meaning it is not explicitly declared by a define_com and so is not part of the webpage manifest), is there a way of forcing the latest version of the 'P' javascript to be downloaded to the browser without (a) specifying &developer=YES on the URL, or (b) clearing my browser cache?

i assume the VLF-ONE framework would be using the *CREATE_FROM technique (?), and would run into the same issue for new part versions, so i wonder if there is in fact a way of doing this?

cheers ...

andrew.
dannyoorburg
Posts: 177
Joined: Mon Jan 04, 2016 9:50 am
Location: Australia

Re: VL for Web: downloading latest version of RP javascript when using *CREATE_FROM.

Post by dannyoorburg »

Hi,

recompiling the Web Page should be enough to guarantee that ALL the generated JavaScript gets refreshed.

If you look at the generated HTML, you'll see it contains something like

ver:"080573707"

and if you watch the network traffic you'll see that every request to get reusable parts/themes etc will have this value as a parameter on the URL.

This number is basically a time-stamp, so it will be unique each time you compile, forcing all subsequent URL's to be different and thus forcing a refresh of reusable parts etc...

The creation method is irrelevant.

Cheers,
Danny
andrewhiom
Posts: 12
Joined: Wed May 11, 2016 10:52 am

Re: VL for Web: downloading latest version of RP javascript when using *CREATE_FROM.

Post by andrewhiom »

thanks for your answer, danny.

i think i'll have to change tack with my framework a bit, away from a single page hosting multiple applications. i was hoping not to have to recompile
and manage the webpage every time (a bit cumbersome because i'm in a task tracking environment with multiple developers).

still, it would be nice to be able to explicitly indicate on the URL that i would like to get the latest .js every time - a sort of cutdown &developer=yes :? :)
Post Reply