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?

Thank you, maybe for now I will set up a hourly cronjob 
to gzip .js and .css files of my Wordpress-through-Jetty 
website (to deal with Wordpress auto-updates)

On Mon, Jul 18, 2016 at 8:02 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).


Back to the top