MyFaces Trinidad
  1. MyFaces Trinidad
  2. TRINIDAD-2235

Skinning: stable names for generated style sheets


    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.2-core
    • Component/s: Skinning
    • Labels:


      For this recently logged Trinidad issue:

      TRINIDAD-2234 Pregeneration of skin style sheets

      We plan to add a skin pregeneration feature in order to support cases where skin style sheets are hosted on a separate host/domain (eg. CDN use cases).

      One issue with this is that the names of the generated style sheet files are not produced in a stable manner.

      For example, a skin that contains the following locale-specific definition:

      @locale ja, cz, ko

      { ... }

      May share a generated .css file across Japanese, Chinese and Korean end users. The name of this generated style sheet depends on which locale is specified when the style sheet is first generated. If the style sheet is generated in response from a request for a Korean-locale user, the file name will include the "ko" locale token. This file will then be shared by Japanese, Chinese and Korean end users. However, if the server is subsequently bounced and the first post-bounce request is from a Japanese end user, the file will be re-generated with the "ja" token.

      As a result of this behavior, file names are not predictable across runs. This lack of predictability makes it difficult to determine which variants of style sheets should be pregenerated. In the above example, although ja/cz/ko users could/should share a single generated style sheet, we would need to pregenerate 3 style sheets just to be sure that we can handle all possible request orderings. However:

      a) This will result in an explosion of generated style sheets. And...
      b) This does not work well for range-based variants, such as agent versions.

      A better solution would be to enhance the way that Trinidad skinning derives names for generated style sheets. Trinidad skinning should provide a solution where style sheet names are produced in a predictable, stable, repeatable (after a server bounce) way.


        No work has yet been logged on this issue.


          • Assignee:
            Andy Schwartz
            Andy Schwartz
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: