Indrajit Raychaudhuri <[email protected]> writes: > A quick followup on this minified js concern...
[...] > So the question is, should we: > > 1. Continue using yuicompressor (to compress js files at build time) > and apply the strategy universally to all toserve/**/*.js > OR > 2. Include the minified version of the js artifacts and get rid of the > build time compression trick > > While #1 has the clear advantage of having human-readable js files in > the repository, it is critically dependent on build time > compression. Exact opposite set of argument holds for #2. Or 2.5: use 1. for the js artifacts included with Lift and let the user decide how to handle their own js files. I would hate to be forced into using the yui compressor for my own files that I put in toserve (not that it isn't a good idea :-) > And since we are debating on this, the other option could be: > > 3. Keep both the form (un-minified and minified) available in > resources/toserve and serve the un-minified form via gzip filter if > user-agent has support for it (most does nowadays) or resort to > minified form if user-agent doesn't. But gzip doesn't remove the need for minify. Gzipped minified jQuery is 40% smaller than gzipped jQuery: http://stackoverflow.com/questions/807119/gzip-versus-minify > The behavior could be controlled via LiftRules even. Of course, this > assumes that most production sites would be behind reverse proxies > with proper cache control etc. and the overhead of gzip-ing is > marginal. Bringing the decision (of minifying) in the framework realm > also opens up the possibility of lazily creating one big js (synthetic > or cached) and serving the entire stuff as one single response > minified or otherwise depending on run.mode. Yes this would be the ideal and has been discussed on the list recently. /Jeppe -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
