version information not salted for static resources

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Normal
    • 9.6.2
    • Affects Version/s: 9.6.0
    • Component/s: None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      1. configure a salt for org.zkoss.zk.ui.versionInfo.enabled

      	<library-property>
      		<name>org.zkoss.zk.ui.versionInfo.enabled</name>
      <!--		Custom 'salt' for version hash -->
      		<value>myversion-001</value>
      	</library-property>
      

      2. load a resource from CWR e.g.

      <?link rel='stylesheet' href="~./css/common.css"?>

      Current Result

      the version hash in static CWR resource urls doesn't change

      Expected Result

      the salt should affect the version hash (obfuscating the version and allow cache busting)

      Debug Information

      the already works for dynamically loaded wpd resources

      Workaround

      modifying the javascript-module version (e.g. for the zk module) will produce a different resource hash
      NOTE: don't forget to update the version string between your releases (if you want to use this for cache busting)

      <?xml version="1.0" encoding="UTF-8"?>
      <language-addon>
          <addon-name>cache-busting</addon-name>
          <language-name>xul/html</language-name>
          <depends>zk</depends>
         
          <javascript-module name="zk" version="myversion-001"/>
      </language-addon>
      

            Assignee:
            DevChu
            Reporter:
            cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: