Hi Alec,

 I'm using this maven plugin on production releases:
http://alchim.sourceforge.net/yuicompressor-maven-plugin/ that
compress the CSS and the JS before packaging it into the WAR.



On Tue, Feb 7, 2012 at 9:06 AM, Martin Grigorov <[email protected]> wrote:
> Hi,
>
> On Mon, Feb 6, 2012 at 11:03 PM, Alec Swan <[email protected]> wrote:
>> Hello,
>>
>> I have a LocalResourceScope class (aliased as "local" shared resource)
>> and style.css in the same package. I can access
>> resources/local/style.css directly from the browser and track the size
>> of HTTP request/response to retrieve CSS.
>>
>> I also tried to do bind the CSS file as follows
>>  new CompressedResourceReference(LocalResourceScope.class,
>> "style.css").bind(Application.get())
>> expecting it to reduce the amount of traffic, but it actually
>> increased request size by about 10%.
>
> Compressing the *response* cannot affect anyhow the *request* size ;-)
>
>>
>> So, why would anybody use CompressedResourceReference when
>> contributing CSS? Is there a resource reference that would strip out
>> spaces and comments from CSS?
>
> CompressedResourceReference uses GZip to squash the text content, so
> all the rules in zip compression are valid here:
> - more text content => better compression
> - compressing binary content => negative effect
>
> For CSS (text content) the result size should be less than the original.
>
> CompressedResourceReference is removed in Wicket 1.5 because all Web
> servers support it for all responses by switching a setting in their
> config. No need Wicket to duplicate this support.
>
>>
>> Thanks,
>>
>> Alec
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
a10! i fins aviat.
J:-Deu

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to