views:

51

answers:

2

In the new sifr 3, the author has implemented the ability to combine the css files into 1 file. There are 4 .js files total and I was wondering if there were any ideas how to combine these files for a faster loading time on the client side and also I was wondering if there was any way to just include the sIFR css styles in an already existing css file.

These modifications would greatly decrease the load/waiting time on the end user and I was wondering if there was any thought for that on upcoming builds or if there were any ideas on how to accomplish this idea.

A: 

There should be only two JavaScript files actually deployed in production, but yes, you can combine them. Just don't try to compress the sifr.js yourself, it's already compressed for you.

Mark Wubben
A: 

Web Resource Optimizer for Java (wro4j) - http://code.google.com/p/wro4j/wiki/GettingStarted is created exactly for this. It can help you to keep your resources (javascripts & css) organized in a single xml, describing how you want to group them and get the merged and minimized version of it using a single request.

Also, wro4j is very configurable and has a lot of bonus features like: extensibility, easy of configuration, css variables support, runtime configuration, maven plugin for build time processing & many others.

Alex Objelean