Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38882

Avoid browser cache busting after Jenkins restart

    XMLWordPrintable

    Details

    • Similar Issues:
    • Epic Link:
    • Sprint:
      atlantic, tasman

      Description

      Atm, the browser caches JS resources via normal cache control and expiry headers. However, the resources are all bundled as adjuncts and adjunct urls have a hash that gets changed after restart, which means all resources need to be reloaded after restart.

      See can we come up with a way of loading the resources from URLs that do not change after a restart.

      James Dumay has already done some experimenting with a replacement ResourceManager. See PR-587.

      Other possibilities ...

      • Look at the use of AssetManager in Jenkins core
      • Look at bundling resources in the plugins under the webapp dir (no hash in these URLs).

      Note that this will most probably require changes to js-builder and js-modules so that we can "plug in" different resource resolution algos e.g. one specific to Blue Ocean and whatever we do above.

        Attachments

          Issue Links

            Activity

            tfennelly Tom FENNELLY created issue -
            tfennelly Tom FENNELLY made changes -
            Field Original Value New Value
            Epic Link JENKINS-37957 [ 174099 ]
            tfennelly Tom FENNELLY made changes -
            Description Investigate the posibility of using the browsers localStorage to store/cache CSS and apply it from there by embedding it in the page (Vs linking via URL). Investigate the possibility of using the browsers localStorage to store/cache JavaScript and apply it from there by evaluating it in the page (Vs linking via URL in a script tag).
            tfennelly Tom FENNELLY made changes -
            Link This issue is related to JENKINS-38881 [ JENKINS-38881 ]
            michaelneale Michael Neale made changes -
            Sprint atlantic [ 106 ]
            tfennelly Tom FENNELLY made changes -
            Link This issue is related to JENKINS-38253 [ JENKINS-38253 ]
            jamesdumay James Dumay made changes -
            Sprint atlantic [ 106 ] atlantic, indian [ 106, 126 ]
            michaelneale Michael Neale made changes -
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Sprint atlantic, indian [ 106, 126 ] atlantic [ 106 ]
            jamesdumay James Dumay made changes -
            Rank Ranked higher
            tfennelly Tom FENNELLY made changes -
            Summary Cache JavaScript in localStorage Avoid browser cache busting after Jenkins restart
            tfennelly Tom FENNELLY made changes -
            Description Investigate the possibility of using the browsers localStorage to store/cache JavaScript and apply it from there by evaluating it in the page (Vs linking via URL in a script tag). Atm, the browser caches JS resources via normal cache control and expiry headers. However, the resources are all bundled as adjuncts and adjunct urls have a hash that gets changed after restart, which means all resources need to be reloaded after restart.

            See can we come up with a way of loading the resources from URLs that do not change after a restart.

            [~jamesdumay] has already done some experimenting with a replacement ResourceManager. See [PR-587|https://github.com/jenkinsci/blueocean-plugin/pull/587].

            Other possibilities ...

            * Look at the use of AssetManager in Jenkins core
            * Look at bundling resources in the plugins under the webapp dir (no hash in these URLs).

            Note that this will probably require changes to js-builder and js-modules so that we can "plug in" different resource resolution algos e.g. one specific to Blue Ocean and whatever we do above.
            tfennelly Tom FENNELLY made changes -
            Description Atm, the browser caches JS resources via normal cache control and expiry headers. However, the resources are all bundled as adjuncts and adjunct urls have a hash that gets changed after restart, which means all resources need to be reloaded after restart.

            See can we come up with a way of loading the resources from URLs that do not change after a restart.

            [~jamesdumay] has already done some experimenting with a replacement ResourceManager. See [PR-587|https://github.com/jenkinsci/blueocean-plugin/pull/587].

            Other possibilities ...

            * Look at the use of AssetManager in Jenkins core
            * Look at bundling resources in the plugins under the webapp dir (no hash in these URLs).

            Note that this will probably require changes to js-builder and js-modules so that we can "plug in" different resource resolution algos e.g. one specific to Blue Ocean and whatever we do above.
            Atm, the browser caches JS resources via normal cache control and expiry headers. However, the resources are all bundled as adjuncts and adjunct urls have a hash that gets changed after restart, which means all resources need to be reloaded after restart.

            See can we come up with a way of loading the resources from URLs that do not change after a restart.

            [~jamesdumay] has already done some experimenting with a replacement ResourceManager. See [PR-587|https://github.com/jenkinsci/blueocean-plugin/pull/587].

            Other possibilities ...

            * Look at the use of AssetManager in Jenkins core
            * Look at bundling resources in the plugins under the webapp dir (no hash in these URLs).

            Note that this will most probably require changes to js-builder and js-modules so that we can "plug in" different resource resolution algos e.g. one specific to Blue Ocean and whatever we do above.
            tfennelly Tom FENNELLY made changes -
            Assignee Tom FENNELLY [ tfennelly ]
            tfennelly Tom FENNELLY made changes -
            Assignee Tom FENNELLY [ tfennelly ]
            jamesdumay James Dumay made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            jamesdumay James Dumay made changes -
            Sprint atlantic [ 106 ] atlantic, tasman [ 106, 136 ]
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            michaelneale Michael Neale made changes -
            Rank Ranked lower
            michaelneale Michael Neale made changes -
            Rank Ranked lower
            jamesdumay James Dumay made changes -
            Rank Ranked higher
            tfennelly Tom FENNELLY made changes -
            Priority Critical [ 2 ] Minor [ 4 ]
            jamesdumay James Dumay made changes -
            Sprint atlantic, tasman [ 106, 136 ] atlantic, tasman, frank [ 106, 136, 156 ]
            jamesdumay James Dumay made changes -
            Sprint atlantic, tasman, frank [ 106, 136, 156 ] atlantic, tasman [ 106, 136 ]
            jamesdumay James Dumay made changes -
            Sprint atlantic, tasman [ 106, 136 ] atlantic, tasman, tethys [ 106, 136, 161 ]
            jamesdumay James Dumay made changes -
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Sprint atlantic, tasman, tethys [ 106, 136, 161 ] atlantic, tasman, kraken [ 106, 136, 166 ]
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            jamesdumay James Dumay made changes -
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Sprint atlantic, tasman, kraken [ 106, 136, 166 ] atlantic, tasman [ 106, 136 ]
            jamesdumay James Dumay made changes -
            Rank Ranked lower

              People

              Assignee:
              tfennelly Tom FENNELLY
              Reporter:
              tfennelly Tom FENNELLY
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: