Hi,

On Mon, Feb 6, 2012 at 11:03 PM, Alec Swan <alecs...@gmail.com> 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: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to