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

version information not salted for static resources

    XMLWordPrintable

    Details

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

      Description

      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>
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: