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

org.zkoss.zk.ui.versionInfo.enabled cannot bust browser cache

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 9.6.2
    • 9.6.0.1
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      1. load a zul with <datebox> without org.zkoss.zk.ui.versionInfo.enabled in zk.xml
      2. check request path `http://localhost:8080/zk9support/zkau/web/_zv2021083012/js/zul.db.wpd`
      3. specify

          <library-property>
              <name>org.zkoss.zk.ui.versionInfo.enabled</name>
              <value>2021</value>
          </library-property>
      

      4. restart the server
      5. open developer tool, make sure don't "disable cache"
      6. reload the page, check zul.db.wpd request path

      Current Result

      it's the same path before specifying org.zkoss.zk.ui.versionInfo.enabled

      Expected Result

      a different path
      http://localhost:8080/zk9support/zkau/web/_zv9576adec/js/zul.db.wpd without enabling "disable cache"

      Debug Information

      1. the version string in the request URL is determined by the code below in zk.wpd

      zkver('','9576adec','/zk9support','/zk9support/zkau'\
      since zk.wpd is cached, its content doesn't change, so the version string in zk.wpd doesn't change, if you don't disable the cache
      2. what application developers expect is after changing the version string, then end-users just reload the same page to get the latest result without opening the developer tool.
      3. when fixing this one, it's better to fix ZK-4986 together
      4. this bug causes the problem to give a patch to customers by replacing js in a jar, because we can't ask all end-user to disable their browser cache.

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

              Created:
              Updated:
              Resolved: