I sort of agree with Mike on this, but I could play devil's advocate and say...
If you include comments in your CSS (which I'm sure you do, because we're all conscientious developers and practice good coding standards. :), then removing them and condensing the file down can make it significantly smaller. It may be an extreme example, but YUI's base.css and base-min.css are 2.23 K and 0.89 K respectively. My CSS files often weigh in at well over 15 K before compression.
Also, keep in mind that these days modern web pages depend heavily on the stylesheet to render in a pretty manner. Therefore the smaller it is, the faster the browser can make use of it.
Just my two cents... This is also useful: http://developer.yahoo.com/performance/rules.html
--Joel (the other one)
Joel Richard
IT Specialist, Web Services Department
Smithsonian Institution Libraries | http://www.sil.si.edu/
(202) 633-1706 | (202) 786-2861 (f) | [log in to unmask]
On Jan 14, 2011, at 11:30 AM, Mike Taylor wrote:
> On 14 January 2011 16:28, Joel Marchesoni <[log in to unmask]> wrote:
>> Hey Everyone,
>>
>> I'm working on optimizing our CSS files and can't find anything about this on the web. I know that some browsers/systems have issues with really long lines in files and wanted to get some opinions about removing all line breaks from a CSS file to conserve space. I've seen some optimizers that give the option NOT to remove them, but don't explain why.
>
> Why bother? CSS files are tiny compared with the images you're no
> doubt also loading and literally negligible compared with video. They
> get loaded once per session, then cached in the browser. Messing with
> the whitespace will have absolutely no perceptible effect on
> efficiency for anyone who's not using a 300 baud modem.
|