I didn't suggest to change the url of resources, in the code we always I want 
xxxx.js. And the url to request the resource is the same.
I suggest to select the stream to return :
* select form cache, cache dir, jar,...
* select version (to allow management of version => xxxx-major.minor.bugfix.js) 
if several version are available
* select format : normal, minified, gzipped, minified+gzipped
* ...

The rules that manage the selection of the stream are configured at the 
Application/ResoursesSettings level.

/david

Johan Compagner wrote:
i don't think that will work very easily because the component will make
ResourceReferences to its internal css and js files
and will be outputted as shared resources. Then all those urls should also
be redirected.

johan


On 9/4/07, David Bernard <[EMAIL PROTECTED]> wrote:
An other solution (stupid ?) :
* at build-time (of the war)
   * scan all the jars and source to find js and css
   * extract/minified/compress into a cache directory
   * include the cache directory into the webapp
* at runtime
   * when a resource is requested, it search into the cache directory
before into the jar and select the better (original, minified, gzipped,...)

A possible advantage, is for user of frontal like Apache, lighttpd,... to
serve those static resources

Johan Compagner wrote:
yeah but a one time hit shouldn't be to much of a problem..cache the
result
The problem with wicket is that you don't know exactly where everything
is
coming from..
They could be in all kinds of jars so if you want compression it should
be
runtime else you need to go over
all the jars and code you use and repackage them.

On 9/4/07, David Bernard <[EMAIL PROTECTED]> wrote:
Right to use it, you provide readers, writers, an ErrorReporter and
options (line-break or not, munge or not, js warning or not,...).
But as Julien (authors of YUI-Compressor) wrote : the compressor is
resource consumming and not made to run on-fly.

/David

Johan Compagner wrote:
thats a pretty nice one, it also compresses CSS. It does depend on
rhino
and
another jar
so its a total of 3 jars so it should be outside the wicket core or
extentions (a project by itself?)
also all the examples that i see are with the command line and input
filenames
i hope it has a interface where you can talk with it in java and with
input
streams/readers

johan


On 9/3/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
On 9/1/07, Matej Knopp <[EMAIL PROTECTED]> wrote:
Well, I certainly didn't want to reinvent the wheel. But all
existing
solutions I was able to find either relied on a third part library
(shrinksafe) or had license not compatible with ASL. So I just wrote
a
simple stripper. I think it still helps a lot, I didn't want to
build
a
perfect stripper.
YUI's license is compatible, so


http://www.julienlecomte.net/blog/2007/08/13/introducing-the-yui-compressor/
might work, right?

Eelco

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


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


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




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

Reply via email to