-
Bug
-
Resolution: Fixed
-
Normal
-
8.6.1
-
Security Level: Jimmy
-
ZK 8.6.2 S1
Steps to Reproduce
hide the version information:
<library-property> <name>org.zkoss.zk.ui.versionInfo.enabled</name> <value>false</value> </library-property>
load any zul page containing dynamically loaded widget packages.
e.g.:
<zk> <textbox/> </zk>
observe the URL loading the JS package zul.inp.wpd
Current Result
independent of the used ZK version this URL remains the same, effectively disabling the cache breaking mechanism for js packages:
http://localhost:8080/zksupport85/zkau/web/js/zul.inp.wpd
Expected Result
a cache breaking part of the URL (obfuscating the actual version/built time)
http://localhost:8080/zksupport85/zkau/web/_zv2018082816/js/zul.inp.wpd
Debug Info
Root Cause
the version info is empty:
https://github.com/zkoss/zk/blob/v8.6.1/zk/src/org/zkoss/zk/ui/http/WpdExtendlet.java#L646
Workaround
specify cache breaking <javascript-module> versions in a lang-addon.xml
for all root packages loaded dynamically in the application (when upgrading the ZK version, also update the version string)
e.g.: for "zul.inp" it is sufficient to specify a module version for the root "zul"
<?xml version="1.0" encoding="UTF-8"?> <language-addon> <addon-name>cache breaker</addon-name> <!-- workaround for https://tracker.zkoss.org/browse/ZK-4287 fixed since 8.6.2 --> <javascript-module name="zk" version="my-version-1"/> <javascript-module name="zul" version="my-version-1"/> ... </language-addon>
this is a manual workaround and the version attribute needs to be updated to change the urls between affected ZK versions, remove this after upgrading to 8.6.2 or higher
- relates to
-
ZK-3689 Using org.zkoss.zk.ui.versionInfo.enabled should also make WPDExtendlet hide version to client
- Closed