background preloader

Web Design

Facebook Twitter

Google Maps

AJAX. Tools. CSS. Javascript/CSS Compression. As some of you may know, I am currently working on a content management system.

Javascript/CSS Compression

Although I am not able to share all of the code – it is proprietary after all – I already made one debugging tool public. This tool can be used to test some common techniques which decreases the bandwidth generated by feed consumers. Today I am going to make a second tool public – including source code. It is a method to decrease the loading time of a page by combining all the different css or javascript files and compress them. About six months ago I noticed the pages generated by the content management system were in itself very clean and small, but that these pages still took a long time to load for new visitors.

The solution turned out the be simple, combine all the different files into a single large file and compress that file using gzip. The idea is that you have one directory for css files and one directory for javascript files on your server. But there is more. Take for example the following URLs: Seven JavaScript Things I Wish I Knew Much Earlier In My Career. Advertisement I’ve been writing JavaScript code for much longer than I care to remember.

Seven JavaScript Things I Wish I Knew Much Earlier In My Career

I am very excited about the language’s recent success; it’s good to be a part of that success story. I’ve written dozens of articles, book chapters and one full book on the matter, and yet I keep finding new things. Here are some of the “aha!” Moments I’ve had in the past, which you can try out rather than waiting for them to come to you by chance. Shortcut Notations One of the things I love most about JavaScript now is shortcut notations to generate objects and arrays. Var car = new Object(); car.colour = 'red'; car.wheels = 4; car.hubcaps = 'spinning'; car.age = 4; The same can be achieved with: Much shorter, and you don’t need to repeat the name of the object. The other handy shortcut notation is for arrays. Var moviesThatNeedBetterWriters = new Array( 'Transformers','Transformers2','Avatar','Indiana Jones 4' ); The shorter version of this is: var direction = x < 200 ?

JSON As A Data Format Resources. Tutorials Round-Up: Ajax, CSS, PHP and More. Advertisement Coding or designing a page, it’s always nice to have some basic templates you can quickly modify or adapt to your needs.

Tutorials Round-Up: Ajax, CSS, PHP and More

However, at least once you have to know, how to create this “universal” template. In this case tutorials prove to be an ultimate solution, particularly if you just want to get an idea how something works and where to start from. In fact, you don’t have to re-invent the wheel all the time – you can use existing solutions, modify and improve them and publish them as well – just the way other people did it for you. In this post we’ve covered over 200 Ajax, CSS, Flash, JavaScript, PHP, MySQL, RSS, XML as well as ASP, C++, Perl, Python and Java tutorials. You may want to take a look at our related posts Ajax CSS Techniques Lightboxes & GreyBoxes.