Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4986

version information not salted for static resources

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 9.6.2
    • 9.6.0
    • None
    • Security Level: Jimmy

      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>
      

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

              Created:
              Updated:
              Resolved: