graphic designer, logo designer

Graphic designer

Don’t miss out

26835 appreciated readers

More articles on

Squeeze the last drop of performance from your site

minify web design code

So you web design is finished, you’ve got pages and pages of quality, with traffic and blog comments galore. If your anything like me, all that’s left to do now is obsess over every infinitesimal detail imaginable to improve your perfectly fine website.

If that sounds like you, you’ll probably be interested in minifying ( See, now the picture of the Morris Mini makes sense… ) your css/code.

The purpose of minifying your site is cut down unnecessary bandwidth usage/load times. The reduction in file size is usually around 20% – 40% which for a 10kb style sheet obviously isn’t a lot, but hey, every bit counts, especially for high traffic sites.

Take this code for example;

h1 {
font-size: 18px;
font-wei ght: bold;
font-family: Helvetica;}

h2 {
font-size: 16px;
font-weight: bold;
font-family: Helvetica;}

p {
font-size: 14px;
line-height: 18px;
font-family: Helvetica;}

a {
color:#D71920;
text-decoration:none;}

a:hover{
text-decoration: underline;}

Your CSS probably looks something like this and with good reason, it’s clean and easy to follow. Once you’re design is finished however there’s space to be saved here.

By changing your code to this;

h1{font-size: 18px; font-weight: bold; font-family: Helvetica;}
h2{font-size: 16px; font-weight: bold; font-family: Helvetica;}
p{font-size: 14px; line-height: 18px; font-family: Helvetica;}
a{color:#D71920; text-decoration:none;}
a:hover{text-decoration: underline;}

You remove any unnecessary data while retaining all the required information for your stylesheet.

Tiny I know.

If you CSS isn’t laid out like this don’t panic, the more user-friendly layout works perfectly fine. But as I said, if your looking for something new to obsess over…

http://www.andrewkeir.com/wp-content/plugins/sociofluid/images/digg_48.png http://www.andrewkeir.com/wp-content/plugins/sociofluid/images/delicious_48.png http://www.andrewkeir.com/wp-content/plugins/sociofluid/images/facebook_48.png http://www.andrewkeir.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png http://www.andrewkeir.com/wp-content/plugins/sociofluid/images/twitter_48.png http://www.andrewkeir.com/wp-content/plugins/sociofluid/images/reddit_48.png http://www.andrewkeir.com/wp-content/plugins/sociofluid/images/blinklist_48.png http://www.andrewkeir.com/wp-content/plugins/sociofluid/images/furl_48.png http://www.andrewkeir.com/wp-content/plugins/sociofluid/images/newsvine_48.png http://www.andrewkeir.com/wp-content/plugins/sociofluid/images/technorati_48.png http://www.andrewkeir.com/wp-content/plugins/sociofluid/images/google_48.png http://www.andrewkeir.com/wp-content/plugins/sociofluid/images/myspace_48.png http://www.andrewkeir.com/wp-content/plugins/sociofluid/images/sphinn_48.png http://www.andrewkeir.com/wp-content/plugins/sociofluid/images/mixx_48.png
Related posts

Leave a Reply

CommentLuv Enabled

blog comments
rss subscriptionemail subscriptionFollow on TwitterThank you!

Popular articles

Recent articles

Graphic design projects

Stock images UPrinting web hosting
logo,web,graphic,designer