Thursday, 6 December 2007

24ways: Minification: A Christmas Diet

Another excellent entry to 24ways for 6th of December. Gareth Rushgrove writes about the necessity to minify HTML, CSS and Javascript for todays web applications.
With all the added Web 2.0 features these days, minification of HTML, CSS and JS cannot be stressed more! Web applications of today are growing into bigger proportions no only content wise, but also form the point of sourcecode.

Minifying your Javascript files or using preminified versions of your favorite Javascript framework is a must, since like your CSS files, these will be generating alot of bandwidth.

At my workplace we decided to adapt existing minifying methods for CSS and Javascript and tie the minification into the Webserver process, using PHP and Apache mod rewrite rules to both minify and cash CSS and Javascript files. This way we are able to reduce the load on sites generated from these files by manyfold, making YSlow cheer at the small file sizes and less loadtimes.

The Apache mod rewrite rules will pick out CSS and Javascript requests to the server and parse them through our PHP Minifier, which will check for an update to the cashed file and minify the code at the same time. To reduce requests even further we added the possibility to load multiple CSS and Javascript files with less requests, by tying them together, when the browser reads the HTML Source.

Saturday, 1 December 2007

24ways - Christmas for Web Developers

Good morning,

Finally a new issue of 24ways :D ! A very nice and complete roundup concerning PNG24 in IE6 and downwards.

Certainly the use for PNG24 in IE through the Alpha filter gets a bit limited and you will have to size the area that contains the transparent PNG accordingly. The Alpha Transperency filters are not of much help either. Usually i end up using “scale” as the sizing method.
Sofar it has proven good and i have been able to provide PNG24 transparency for client projects that way.

I would not start using Javascript to counter the drawbacks though. In my opinion Javascript should only be added to include functionality, but not cripple it, should Javascript not be available. That might sound as if i am talking back from way 1990, but there are still alot of places (hotels, airports, etc.) that do not allow Javascript in their browsers. Usabilty should have priority before anything.

Dear web developers, enjoy your first issue of 24ways:
Transparent PNGs in Internet Explorer 6 by Drew McLellan