On Tue, Feb 7, 2012 at 6:30 PM, Alec Swan <alecs...@gmail.com> wrote:
> 3 responses in one day, awesome!
>
> Serban and Jordi, our app allows users to upload custom CSS so
> compile-time solutions will not work for us here.
>
> Martin, if I understood you correctly there is no special support,
> such as removing comments, in Wicket for CSS resources, right? If
> CompressedResourceReference is removed in 1.5 what should be used
> instead? (In migration guide
> https://cwiki.apache.org/WICKET/migration-to-wicket-15.html it says
> "See above")

There are CssCompressor and JavaScriptCompressor which have no default
impl. You can use YUI compressor or Google Compiler.
CompressedResRef is removed because the web container does this for
you. Check your web container docs.

>
> Thanks,
>
> Alec
>
> On Tue, Feb 7, 2012 at 1:19 AM, Jordi Deu-Pons <jo...@jordeu.net> wrote:
>> 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 <mgrigo...@apache.org> wrote:
>>> 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
>>>
>>
>>
>>
>> --
>> a10! i fins aviat.
>> J:-Deu
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
> ---------------------------------------------------------------------
> 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