Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Minify JavaScript and CSS with the help of Jetty?

Hi,

On Mon, Jul 18, 2016 at 5:09 PM, Alexander Farber
<alexander.farber@xxxxxxxxx> wrote:
> Hi Simone,
>
> On Mon, Jul 18, 2016 at 5:00 PM, Simone Bordet <sbordet@xxxxxxxxxxx> wrote:
>>
>>
>> Note that Jetty's DefaultServlet (that serves static files), is
>> capable of serving files compressed if they exist.
>> That is: client requests /style.css, but on file system you have
>> style.css.gz.
>> DefaultServlet will serve the latter with the proper Content-Encoding.
>>
>
> what if I have style.css - will it send it gzip it on the fly?

No, unless you configure the GzipHandler to do on-the-fly compression.
http://www.eclipse.org/jetty/documentation/9.3.x/gzip-filter.html

However, pre-compressed content is always best (there are few JVM bugs
reported against leaking memory when using gzip).

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top