Optimization Tutorials
Speeding Up My Website
One of the biggest goals with my website redesign was to update something no one sees — website speed. Sure I'm using different colors, fonts, JavaScript techniques, and images but I'm most proud of the the speed increases I made. Let me explain the ways I've improved my website performance — maybe you can learn something from what I implemented.
MooTools TwitterGitter and Cookies
One of my MooTools plugins I use most is TwitterGitter. TwitterGitter is a small MooTools plugin I've created to fetch any number of tweets from an Twitter user's account. Since clients don't tweet very often, there's no advantage to pinging Twitter for a tweet every page load. To save Twitter a bunch of repetitive requests, I use cookies to save the latest tweet.
Reduce PNG Graphic Size Using PNGCRUSH
Now that I'm knee-deep in MacBook I love working with command line applications. There's a certain beauty in the simplicity of using the console instead of a nice GUI. One task I use the console for often is reducing the size of PNG files using the powerhouse that is PNGCRUSH.
MooTools Class Creation Tips
Writing MooTools classes can be a daunting task, even for a novice MooTools developer. Here are a few tips I've picked up along the way that will take your Moo plugin / class development to the next level.
Creating & Using CSS Sprites
The idea of CSS sprites is pretty genius. For those of you who don't know the idea of a sprite, a sprite is basically multiple graphics compiled into one image. The advantages of using sprites are:
5 Rules For Using Audio/Video Media on Your Site
I don't create many sites that feature multimedia. Most of my customers don't have a need for audio or video on their site but we occasionally get a request to add an advertisement or webinar. That said, I've scoured the internet enough to have seen good, bad, and ugly uses of multimedia on the web. The following are my guidelines for using multimedia on a website.
My Website Tools
For those of you who eat up my RSS feed (thank you), you may not know that I have some pretty helpful tools on my website.
Compress Your XHTML Page Output Using PHP Output Buffers
Us programmers love to keep our code readable and neat, which is why we use hundreds of tabs and line feeds in our code. The problem with doing this in the web programming world is that our users don't care about our neatly indented code. They don't care about our detailed code comments. They certainly don't care about the two-vs-three-vs-four spaces in a tab debate. So why should we make them download the extra code? With some quick PHP code, you don't need to.
Organized, Short Folder Structure Using mod_rewrite
I tend to be over-organized when I create the folder structure of my customers' websites. I like using descriptive file and folder names for a number of reasons:
PHP / MySQL Database Optimization Function
After frequent record deletion from your MySQL database tables, your tables can acquire overhead. Overhead is empty space left inside the database table due to the deletions. A great way to speed up your MySQL database, not to mention keep it compact, is to use a simple PHP function to optimize your database tables: