Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core, extras
    • Labels:
      None
    • Environment:
      Click 1.5

      Description

      Hi Malcolm,

      Here are a list of enhancements I think would make PerformanceFilter more newbie friendly:

      #1 It would be nice to leave the PerformanceFilter in web.xml for development mode and do not need to change the web.xml file when deploying to production. However the Filter always caches, thus while editing 'css' and 'js' files we need to forcefully refresh the browser to ensure the cache is flushed.

      So my suggestion is that if application mode is below 'profile', PerformanceFilter should not use caching.

      #2 Currently Click adds a version to 'css', 'js' and image files. This might seem surprising for new user. I am worried this will confuse them, since performance won't be a worry in the early stages. I have been reading up on browser caching and it seems that the filename is used to cache the resource. If the contents of the file changes the browser won't reload. Only when the filename changes will it reload.

      So the suggestion is to let the PageImports add the version info only in production/profile mode. In production modes the 'js', 'css' and images would have versions appended to them. Since these resources do not actually exist on the server, the PerformanceFilter must strip of the version info from the path and forward (using RequestDispatcher) these requests to their real locations.

      I made a quick prototype of #2 to ensure it does in fact work.

      If these suggestions are approved I can upload a patch if needed.

      regards

      bob

        Activity

          People

          • Assignee:
            Bob Schellink
            Reporter:
            Bob Schellink
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development