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?

Hello, just a note for the archives -

In my Wordpress-served-through-Jetty config as described at
http://www.eclipse.org/jetty/documentation/current/configuring-fastcgi.html
I have additionally set "gzip" init parameter to "true" with:

    <Call name="addServlet">
        <Arg>
            <New class="org.eclipse.jetty.servlet.ServletHolder">
                <Arg>default</Arg>
                <Arg>
                    <Call name="forName" class="java.lang.Class">
                        <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
                    </Call>
                </Arg>
                <Call name="setInitParameter">
                    <Arg>dirAllowed</Arg>
                    <Arg>false</Arg>
                </Call>
                <Call name="setInitParameter">
                    <Arg>gzip</Arg>
                    <Arg>true</Arg>
                </Call>
            </New>
        </Arg>
        <Arg>/</Arg>
    </Call>

and then I have added a hourly root-cronjob to compress the Wordpress CSS files
(and will add another one for JS files later, when done with JS development;
and the php files already gzip because of zlib.output_compression = On in php.ini):

find /var/www/html/slova.de/ -iname \*.css -exec su -c "gzip -c {} > {}.gz" apache \;

And this seems to work well, thank you.


Back to the top