Hi,

To avoid runtime/on-the-fly compression (js minification/packing,... gzip 
compression) of static resources (!= dynamic),
I do it at compile time (done via the yuicompressor-maven-plugin) and provide 3 
formats (original, minified, minified+gzip)

But I need to choose the right at runtime.

if !settingsMinifiedSuffixes.isEmpty() {
  foreach minifiedSuffix {
    if resource with minifiedSuffix exists {
      resource = resource with minifiedSuffix
    }
  }
}
if gzipAllowed {
  if resource with gzip exists {
      resource = resource with gzip
    }
  } else compress(resource)
  setHttpHeader(gzip)
}

In your opinion where is right (simplest/best) place to implement the Resource 
Selection Policy (may be later could be generalized with locale and style 
selection).
1/ When resource is requested
2/ When url of the resource is build
3/ In a filter
4/ ...

optionals requirements :
* define settings at Application level (init)
* no need to patch wicket source
* applied and compatible with existing Resource's implementation

What are your suggestions ?

Regards

/David

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to