What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

Compressing your CSS files

Wrong

Member
w w w .cssdrive.com/index.php/main/csscompressor (delete the spaces between the w's; for some reason, it won't let me post the link).

That's the link to a CSS compressor that can make your .css files smaller for better loading times. You can choose between different types of compression (light, normal, compact). It basically deletes break lines, the ; before each } (which is unneeded), turns #FFFFFF to #FFF, etc. Make sure to keep a copy of your uncompressed files in case anything goes wrong, by the way!
 
Thanks buddy, your website is really good, it's very useful for me because my CSS codes are always a bit confused.
 
Thanks for this, It helps keep all my CSS codes neat, They should implement this into Html editors etc. It would be a great add-on in my opinion. I can finally not have a clustered up CSS files for once!:cool:
 
I usually do not compress my CSS due to the minimal amount of space it saves and the inconvenience it causes when directly editing files from the server. Of course this would be much different if I were running a larger site where every small difference can make a huge change in total bandwidth.
 
Thanks buddy, your website is really good, it's very useful for me because my CSS codes are always a bit confused.

It's actually not my site, but you're welcome. Make sure your CSS files don't have any format errors; if they do, compressing can really screw things up.

I usually do not compress my CSS due to the minimal amount of space it saves and the inconvenience it causes when directly editing files from the server. Of course this would be much different if I were running a larger site where every small difference can make a huge change in total bandwidth.

You can actually make files considerably smaller when compressing them. I could really see the difference in my site too. And, over time, you get used to editing the compressed file whenever you need to tweak something. I think it's worth it.
 
Wow, great tool man. I definitely didn't know you could speed up your site by trimming the css code. Thanks for letting me know :)
 
There are gains to be had from compressing css, but images will usually generate more savings. There are some decent online compressors, and in photoshop you can experiment with image quality settings to keep file sizes down. Also. look into image sprites and combining css files into one. These techniques don't save on space, but reduce the number of individual requests that your browser makes to the server, resulting in a page that loads more quickly.
 
There are gains to be had from compressing css, but images will usually generate more savings. There are some decent online compressors, and in photoshop you can experiment with image quality settings to keep file sizes down. Also. look into image sprites and combining css files into one. These techniques don't save on space, but reduce the number of individual requests that your browser makes to the server, resulting in a page that loads more quickly.

Indeed, CSS sprites are a great way to make things reasonably faster. There are some websites in which you can simply upload different images and they'll be automatically be turned into 1 only image, and will be given the CSS code to properly display it. I highly recommend that for icons.
 
On my Wordpress installations, I normally use Quick Cache. It's simpler to set up than, say, W3 Total Cache. And it works. There's also another plugin called Minify which is supposed to compress CSS files. However Minify and Quick Cache don't seem to work together. When I have both enabled, the page loads even more slowly. Now I am looking into some other plugins which can create CSS Sprite. I will update later.
 
Back
Top