Hello,
In VL-WEB, we have problems, that changes in components (typically reusable parts) are not detected by clients. It is client cache problem, which have to be cleaned manually by user, and not all users doing it. The browsers probably do not detect, that file datetime stamp or size was changed.
Do you have any recommendation, how to manage it? It is not possible to instruct all users to clear cache in particular interval.
In Webevent functions or WAMS it was not problem, because the pages were generated dynamically.
Dissabling cache at all might solve it, but maybe it is not a good idea because of performance. Any other way, how to 'mark' changed component for re-load by browser instead of cache usage ?
VL-WEB cache management
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: VL-WEB cache management
Hi Jiri
Whenever you make a change to a reusable part in a production environment, you'll need to recompile the HTML page as well. This will ensure a new cache manifest is created.
Danny explains the process towards the end this thread.
http://vlforum.lansa.com.au/viewtopic.p ... t=47&p=135
Regards
Whenever you make a change to a reusable part in a production environment, you'll need to recompile the HTML page as well. This will ensure a new cache manifest is created.
Danny explains the process towards the end this thread.
http://vlforum.lansa.com.au/viewtopic.p ... t=47&p=135
Regards
Re: VL-WEB cache management
Thanks for explanation. I activated the cache manifest and added required components (some of them are dynamically referred, so the cross reference cannot find them automatically).
Now I am wondering:
- It works absolutelly fine, if I use standard URL:
http://<server>/lansa14/<partition>/<page>.html
.. but does not work fine with simple start page, created by example from Danny
http://<server>/<page>.html , placed in webserver root
The <page>.html placed in webserver root is almost the same, except the dynamical references (i.e. partition) are replaced by fixed strings, like in Danny's example. The page itself works (application is started correctly) but the cache is not refreshed.
In the header of LANSA generated page is :
<html manifest="/%{lansa_webalias}%/%{lansa_partition}%/home00.appcache" lang="en" style="height:100%">
in the header of static page is:
<html manifest="/LANSA14/isy/home00.appcache" lang="en" style="height:100%">
I made following steps:
1) Modified and recompiled one reusable component, referred in manifest
2) Tested with both URLs. No change detected (as expected), old version taken from browser cache
3) Recompiled the home page (to force re-create cache manifest)
4) Tested using standard url (http://<server>/lansa14/<partition>/<page>.html) - new version of component used (OK)
5) Tested using short url (http://<server>/<page>.html , old version
used from cache
6) Formally modified the static start page in webserver root - no change. Old version still used :-O
Why the cache manifest does not work referred from static page? Any idea, how to do it?
Now I am wondering:
- It works absolutelly fine, if I use standard URL:
http://<server>/lansa14/<partition>/<page>.html
.. but does not work fine with simple start page, created by example from Danny
http://<server>/<page>.html , placed in webserver root
The <page>.html placed in webserver root is almost the same, except the dynamical references (i.e. partition) are replaced by fixed strings, like in Danny's example. The page itself works (application is started correctly) but the cache is not refreshed.
In the header of LANSA generated page is :
<html manifest="/%{lansa_webalias}%/%{lansa_partition}%/home00.appcache" lang="en" style="height:100%">
in the header of static page is:
<html manifest="/LANSA14/isy/home00.appcache" lang="en" style="height:100%">
I made following steps:
1) Modified and recompiled one reusable component, referred in manifest
2) Tested with both URLs. No change detected (as expected), old version taken from browser cache
3) Recompiled the home page (to force re-create cache manifest)
4) Tested using standard url (http://<server>/lansa14/<partition>/<page>.html) - new version of component used (OK)
5) Tested using short url (http://<server>/<page>.html , old version
6) Formally modified the static start page in webserver root - no change. Old version still used :-O
Why the cache manifest does not work referred from static page? Any idea, how to do it?
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: VL-WEB cache management
Hi Jiri,
I just tried your scenario and it works for me.
Do you get any useful information at all if you use the browser's development tools (F12) and look at the console while you refresh the page?
The console will log the application cache behaviour.
Note: if the app-cache is different LANSA will force a refresh of the page, so you might want to check Preserve log (this is in Chrome), otherwise it'll disappear on you again.
Cheers,
Danny
I just tried your scenario and it works for me.
Do you get any useful information at all if you use the browser's development tools (F12) and look at the console while you refresh the page?
The console will log the application cache behaviour.
Note: if the app-cache is different LANSA will force a refresh of the page, so you might want to check Preserve log (this is in Chrome), otherwise it'll disappear on you again.
Cheers,
Danny
Re: VL-WEB cache management
I simply added an image to existing button, placed in reusable part.
I tested that it was not visible (because of cache) using both URLs.
After re-compiling of the entry point page (to force re-build cache manifest), with standard url:
http://<server>/lansa14/<partition>/<page>.html
it was visible okay.
with url, based on static page:
http://<server>/<page>.html, referring to the same manifest file it was NOT visible.
Also after cache site clear, it was still NOT visible.
I had to go to Firefox settings, last option and request Delete Off-line content and data from the used server.
It finally fixed the problem, after that it was visible by both urls.
I tested that it was not visible (because of cache) using both URLs.
After re-compiling of the entry point page (to force re-build cache manifest), with standard url:
http://<server>/lansa14/<partition>/<page>.html
it was visible okay.
with url, based on static page:
http://<server>/<page>.html, referring to the same manifest file it was NOT visible.
Also after cache site clear, it was still NOT visible.
I had to go to Firefox settings, last option and request Delete Off-line content and data from the used server.
It finally fixed the problem, after that it was visible by both urls.