Skinning: stable names for generated style sheets
-------------------------------------------------
Key: TRINIDAD-2235
URL: https://issues.apache.org/jira/browse/TRINIDAD-2235
Project: MyFaces Trinidad
Issue Type: Improvement
Components: Skinning
Reporter: Andy Schwartz
Assignee: Andy Schwartz
Priority: Minor
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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira