4. less can be more

| No Comments

Just look at the google.com and compare it to for example yahoo.com :-)

But I'm not going to compare those, rather I look where less is more at ba.pm.org. This is the case of CSS and JavaScript. To optimize this there are two transformations using YUI Compressor. From Makefile:

YUICOMPRESSOR=java -jar script/yuicompressor-2.4.2.jar

JS_FILES_TO_MINIFY=\
	src/js/01_jquery-1.2.6.js \
	src/js/02_jquery.sprintf-0.0.3.js \
	src/js/03_Gettext-0.04.js \
	src/js/04_i18n-0.04.js \
	src/js/05_thickbox-3.1.js \
	src/js/06_mongers.js \
	src/js/07_maps.js \
	src/js/08_dropShadow.js \
	src/js/08_jquery.cookies.2.1.0.js \
	src/js/09_feedback.js \

CSS_FILES_TO_MINIFY=\
	src/stylesheets/01_main.css \
	src/stylesheets/02_thickbox.css \

html/js/script.js: ${JS_FILES_TO_MINIFY}
	cat ${JS_FILES_TO_MINIFY} | ${YUICOMPRESSOR} --type js --charset UTF-8 -o $@

html/stylesheets/style.css: ${CSS_FILES_TO_MINIFY}
	cat ${CSS_FILES_TO_MINIFY} | ${YUICOMPRESSOR} --type css --charset UTF-8 -o $@

There are two more things to compress, but no-one had any touits to do it for ba.pm.org page. Still. One is the static html. It can be optimized by htmlclean. The other one are the picture files. There are plenty of tools to do so - pngout, optipng, pngcrush, jpegtran, pngquant, ...

Well and why? To save bandwidth, storage, download times => save money and at the same time enhance the user experience.

Leave a comment

Updates

Subscribe to the blog updates with an email:

If you like it, share it.

Pages

About this Entry

This page contains a single entry by Jozef Kutej published on November 6, 2009 7:57 PM.

3. scraping my self was the previous entry in this blog.

6. feed us back is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.