Compress the CSS to Speed Up Blogspot and Wordpress Load Time
Most free 3rd party Blogger templates that you download are a mess. You open up the xml file and it’s a long and ugly-looking beast of code spaghetti. If you’re like me, you prefer a nice and neat template (even though you’ll be the only one seeing it) and you’ll want to tidy it up.
Most of the code you don’t want to tinker with but the .css code (the part that styles your entire blog with images and colors) is where some people like to change font colors, sizes, or even just space it out properly so it’s important that it’s not only neatly organized, but also properly aligned.
More importantly, did you know the more lines of code your template has, the longer it takes to load in a browser? So your 1,500 lines of code in your newest Blogger template could really be much shorter in size, thus speeding up page load times for your visitors. The slower your site, the more likely a visitor will be deterred and not wait for it to load up.
So here’s a neat trick to optimize your template. I’ve started doing it with some of the newer templates now being hosted on eBlog Templates. You’ll want to do what’s called “commpress your css” into a much smaller format. There’s a site I use called CSSDrive that offers a free web-based CSS Compressor. All you do is select a few basic options like compression mode and comments handling and then paste in your css. The css is the code between the <b:skin> and </b:skin> tags.
Make sure you backup your template code before doing this! Some people might not like how the css looks after it’s compressed so it’s best to have a backup. You also might make a mistake and copy the wrong sections which could screw up your template code. Bottom-line, backup your template before doing this.
After you click on the “Compress-it!” button it will go through your .css code and shrinks it down. Essentially it removes unnecessary white spaces and better organizes each css element into one line. Here are the results for one of the Blogger templates I compressed.

My xml Blogger template was originally 1,286 lines of code and after the css compression was done, it dropped it down to 914. Now that’s not a huge difference (14%) and you probably won’t notice a difference when you load up your blog with the new code, but every little bit helps. Also, some template code might be messier than others so the size decrease could potentially be a lot more.
I also just ran the normal compression mode and wanted to keep my comments so if you go with the super compact mode and strip out all comments, you can compress it even further.
This tool can be used for WordPress blogs or any other websites actually. Most of the Blogger templates I come across are the ones in need of a code clean up, however. So if you’re ready to give CSS Compression a shot, check out CSS Drive’s free tool and compress away!
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.
Comments
Just posted a review of your blog at http://todaysblogreview.blogspot.com/2008/08/bloggers-source-for-blog-and-blogging.html
Hope you like it… Thanks!
[Reply]
[...] public links >> loadtime Compress the CSS to Speed Up Blogspot and Wordpress Load Time Saved by shazminali on Fri 26-9-2008 Save Money with Faster Page Load Times Saved by lenuni on [...]
hey man i love your site.. your friend michael told me you were looking for a new way to earn some extra income online.
i own an awesome website where you can make money online..most our users are making like 20-50 bucks a day.. with minimal work.. its pretty simple to do.. its actually so easy to do you won’t believe ill actually pay you to do it.. and its 100% free to sign up and try.
another positive about my site unlike all the other sites.. i will pay you out daily.. so you earn 5 bucks in the first 5 minutes you work on my site.. request a payout and i will pay you out right then.. i guarantee no other sites like mine will pay out daily multiple times..
i’d be glad to help you.. if you sign up..
http://tinyurl.com/6255qv
[Reply]


















btw,,, thanks for sharing
I think this is on of the best blogging tool,
i’m using this too for my blog.. and its true.. faster (just.. better then before
)
[Reply]
admin Reply:
July 30th, 2008 at 12:38 am
thanks dude, i’m glad if this information useful to you, you have a nice blog too, hope a long successfull era to you
[Reply]
firdaus Reply:
August 12th, 2008 at 2:26 am
thx.. you too
[Reply]