ADVERTISEMENTS
Today I updated one of my Wordpress blog to version 2.8 and found some good changes in it. One of the change that forced me to write this tutorial was in the Editor section. Wordpress has added a new feature in its latest version that tells about the number of lines in the code.
Have a look :

In the above image you can see the numbers in the leftmost side. These numbers tells the total number of lines in your code. More the number of lines, more long will be your code and more will be the loading speed. So, here is a simple trick with which you can minimize your line of codes.
Open your Style.css file, in this file you will see CSS coding, I’ll explain you about the tutorial by taking this example. Have a look at the code below :
a:link {
color: #2f63b3;
text-decoration: none;
}
The above code is counted as a 4 line code, have a look :

Now, to minimize the lines, remove all the spaces after ; and write the code continuously without any space. So, your four line code will come in 1 line and will look like this :
a:link { color: #2f63b3; text-decoration: none; }
Similarly do this for all the codes in your Style.css file and you will see a difference in your template loading speed. It will be a minor change in the speed, if you are happy with your template loading speed its better you do not try this.
If you like this post, you will love these :
- How To Make Your Web Page Load Faster
- List Of All 255 Keyboard All Alt Key Codes
- 20+ Codes and Hacks Every Wordpress User Should Know
- How to make your Windows XP super-fast in 2 seconds !
- How To Change/Modify AutoSave Interval Time In Wordpress
- Online Tool To Compress CSS Code
- All HTML Tags And Attributes : Lesson 4 Part2
Gaganpreet Singh on June 12, 2009 | Filed Under Blogger Templates, Blogger Tricks, Wordpress



Welcome to
{ 19 comments… read them below or add one }
I will also update my blog to the earliest.By the way where are you hosting your blog buddy ??
I haven’t upgraded to WP 2.8 yet. Will do now
Hey, nice post, really well written. You should post more about this.
Hey, nice post, very well written. You should post more about this. I’ll definitely be subscribing.
I couldn’t understand it. How is it affecting the loading speed?
Hope they may must have spaces between two syntax…
a:link { color: #2f63b3; text-decoration: none; }
Since there is space between the two syntax’s
Am i right gagan?
Really good tip.Thanks but it would take a very long time wouldn’t it?
Good post Gagan,
i have one question,
will this also help me in my blogger template?
@ Aneesh,
of course, try it once.
Is there Any automated tool to do it…
my css have nearly 1000 lines
Thanks
Sorry, dnt know about any such tool, let me search for such tool and if I found it, I’ll surely blog about it.
I’ve just valide my CSS with w3.org. There are no errors so I think it will be ok to leave it like that it took lot time to fix all the errors.
Has anyone tried that yet ? any improvements ?
I use thesis 1.5 wordpress theme which itself load faster and css validator. Anyway its a really great knowledge.
I have just gone through my css file and there are tons a empty lines. I have cleaned it. I would like to ask you if comments would also play a role in loading time. I ask this as I’m using Thesis and I have a one line comment by all my custom css styling, would that also affect loading time?
Hi ,,,nice to meet ur site,
I from Indonesia, Im A beganner in wordpress, How to change template in WP. I ever to tray but I can’t.
Nice to Solve my problem with You..
Thanks.
…..www.TheJaev.co.cc
Use any FTP program like FileZilla, log in into your ftp server, now go to wp-content folder and open themes and upload your desired theme into this folder.
Now, in the Wordpress dashboard, click on on theme under Appearance tab and you can see your uploaded theme there, click on Activate to apply that theme to your blog. Simple !
Is there any software which could easily condense the codes like this???
sorry Prateek I do not know about any such software.
after reading this post, i just wanna say you rock gagan