Warning: Cannot modify header information - headers already sent by (output started at /home/content/w/t/b/wtbgirlfriend/html/wp-content/plugins/recommended-links.php:1507) in /home/content/w/t/b/wtbgirlfriend/html/wp-includes/feed-rss2-comments.php on line 2
Comments on: 10 Tips For A Smaller CSS File http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/ Patrick Burt Fri, 12 Mar 2010 15:32:40 +0000 http://wordpress.org/?v=2.2.1 By: Nic http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-16752 Nic Wed, 15 Apr 2009 00:22:59 +0000 http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-16752 Well, you wouldn't edit that. :) Instead- you keep am uncompressed version, but before you push it to a live site you compress it. I guess it's just preference- it's a trade off between a minuscule amount of manual labor vs a minuscule amount of machine labor. Well, you wouldn’t edit that. :)

Instead- you keep am uncompressed version, but before you push it to a live site you compress it. I guess it’s just preference- it’s a trade off between a minuscule amount of manual labor vs a minuscule amount of machine labor.

]]>
By: Patrick Burt http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-16749 Patrick Burt Wed, 15 Apr 2009 00:02:27 +0000 http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-16749 @Nic It can start to become frustrating to uncompress/recompress. Imagine trying to edit this: http://www.pat-burt.com/wp-content/themes/default/css.php?file=style.css @Nic
It can start to become frustrating to uncompress/recompress. Imagine trying to edit this: http://www.pat-burt.com/wp-content/themes/default/css.php?file=style.css

]]>
By: Nic http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-16748 Nic Wed, 15 Apr 2009 00:00:16 +0000 http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-16748 Definitely all things I've come to learn in time... wish I saw this article a while ago. Why use PHP to compress files though? You're still adding extraneous load... why not just compress your CSS before posting to production? Definitely all things I’ve come to learn in time… wish I saw this article a while ago. Why use PHP to compress files though? You’re still adding extraneous load… why not just compress your CSS before posting to production?

]]>
By: Sam http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-16286 Sam Wed, 08 Apr 2009 16:30:15 +0000 http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-16286 Thank you for this :) Excellent little tutorial. Thank you for this :) Excellent little tutorial.

]]>
By: mjcpk http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-11446 mjcpk Sun, 04 Jan 2009 22:15:21 +0000 http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-11446 Whilst I agree with using the short-hand versions of font, border etc I think that suggestions 9 and 10 aren't much use. It is far better to lay out your CSS files in a way that makes sense to you; in a way that makes it easy to work with when you next need to. You should then minify the file before uploading it to the server. When the file is minified ( look online for CSS minifiers ) unnecessary characters are remove. This includes newlines and comments and any extra tabs or spaces. This way you have a small file on the server and a clear and easy to use one on your computer. Also, It is probably better to use the web servers own tools for compression rather than using a php script. Not all web browsers can handle compressed files and the web server will only server up compressed files if asked to by the browser. If you don't want to use this method ( or can't ) then you may as well put the compressed file on the server rather than force the server to compress it every time it serves it using a php script. Whilst I agree with using the short-hand versions of font, border etc I think that suggestions 9 and 10 aren’t much use. It is far better to lay out your CSS files in a way that makes sense to you; in a way that makes it easy to work with when you next need to. You should then minify the file before uploading it to the server.

When the file is minified ( look online for CSS minifiers ) unnecessary characters are remove. This includes newlines and comments and any extra tabs or spaces. This way you have a small file on the server and a clear and easy to use one on your computer.

Also, It is probably better to use the web servers own tools for compression rather than using a php script. Not all web browsers can handle compressed files and the web server will only server up compressed files if asked to by the browser. If you don’t want to use this method ( or can’t ) then you may as well put the compressed file on the server rather than force the server to compress it every time it serves it using a php script.

]]>
By: Warren http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-10721 Warren Sat, 20 Dec 2008 12:44:51 +0000 http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-10721 Great tips. I was looking for info for my CSS file which is 7kb in size. I've been searching around for an article like this so I can compare my css file to it. I've always been worried about making a css file too big, now I know that I can go twice as big if I needed to. I bet I can get my 7kb down to 5kb or 4kb using these tips. Great tips. I was looking for info for my CSS file which is 7kb in size. I’ve been searching around for an article like this so I can compare my css file to it. I’ve always been worried about making a css file too big, now I know that I can go twice as big if I needed to. I bet I can get my 7kb down to 5kb or 4kb using these tips.

]]>
By: This Weeks Top 5 Links | devjargon http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-5506 This Weeks Top 5 Links | devjargon Sat, 26 Jul 2008 20:49:19 +0000 http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-5506 [...] 10 Tips For A Smaller CSS File If you’re site is getting a lot of traffic, you’ll want to save file size any where you can. Your CSS file is one spot where you can save a few kB in the hope that it’ll speed up your site. Here are 10 tips to make your CSS file small and hopefully speed up your site. [...] […] 10 Tips For A Smaller CSS File If you’re site is getting a lot of traffic, you’ll want to save file size any where you can. Your CSS file is one spot where you can save a few kB in the hope that it’ll speed up your site. Here are 10 tips to make your CSS file small and hopefully speed up your site. […]

]]>
By: Dwayne Charrington http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-5377 Dwayne Charrington Tue, 22 Jul 2008 05:54:58 +0000 http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-5377 These are some pretty great tips. Awesome article. Hopefully some people will take heed of these and start making their slow websites that extra bit optimised. I am guilty of excessive and unnecessary spacing and comments. - Dwayne. These are some pretty great tips. Awesome article. Hopefully some people will take heed of these and start making their slow websites that extra bit optimised. I am guilty of excessive and unnecessary spacing and comments.

- Dwayne.

]]>
By: Css Over Load « http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-1805 Css Over Load « Thu, 24 Jan 2008 17:20:23 +0000 http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-1805 [...] http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file [...] […] http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file […]

]]>
By: Marco http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-1161 Marco Mon, 03 Dec 2007 14:33:40 +0000 http://www.pat-burt.com/web-development/10-tips-for-a-smaller-css-file/#comment-1161 <p><p>Hi, thanks for the credits! Not sure what you mean by 'cleaned up' though when it comes to my php snippet? ;)</p><br /> <p>By the way, if you're on WordPress you should use my <a href="http://www.i-marco.nl/weblog/archive/2007/05/31/wpcssstreamliner_css_optimizat" rel="nofollow">WP-CSS-Streamliner plugin</a> which does merging of multiple files and compressing fully automatically for you. If you have a WordPress with many different CSS files inserted by plugins it will give you a massive speed gain.</p></p> <p>Hi, thanks for the credits! Not sure what you mean by ‘cleaned up’ though when it comes to my php snippet? ;)</p>
<p>By the way, if you’re on WordPress you should use my WP-CSS-Streamliner plugin which does merging of multiple files and compressing fully automatically for you. If you have a WordPress with many different CSS files inserted by plugins it will give you a massive speed gain.</p>

]]>