How to decrease CSS file Size?

Discussion in 'HTML & Website Design' started by max196, Sep 24, 2010.

  1. #1
    Hi Friends,

    I have build my website with new design using css. The size of my css file is aprox. 18kb

    1) Does decreasing css file size play role in SEO?
    2) Do I need to decrease my css file size? (18kb to less)

    I have removed most of the blank spaces from my spaces. any other method, I can use?

    Also, I've seen many websites using all css code on a single line. I think we can do it using php, How can I do it?


    Thank You!
     
    max196, Sep 24, 2010 IP
  2. prestashopic

    prestashopic Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Using 1 line css will decrease download time of css file
     
    prestashopic, Sep 24, 2010 IP
  3. Martenxxx

    Martenxxx Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If size of your CSS files isn't monster, you can let them uncompressed with any problems.
     
    Martenxxx, Sep 24, 2010 IP
  4. Tedel

    Tedel Well-Known Member

    Messages:
    326
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    130
    #4
    1. No, it doesn't.
    2. You can reduce the file size repeating classes, using shorthand CSS instructions, and simplifying your design. It is not a must for a 18kb large CSS file.

    Best,
    Tedel
     
    Tedel, Sep 26, 2010 IP
  5. zuchrivious

    zuchrivious Active Member

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #5
    1. not directly, faster sites are more favorable by search engines
    2. try audit your entire site with yslow or pagespeed, css might not be your biggest problem regarding speed
     
    zuchrivious, Sep 26, 2010 IP
  6. nicky821

    nicky821 Member

    Messages:
    95
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #6
    Yes reducing the css file is a good easy way to start speed optimizing. Use the pagespeed addon, it will automatically create your css file. I believe you can do the same with your html files but I wouldnt suggest that :)
     
    nicky821, Sep 26, 2010 IP
  7. 51face

    51face Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I think 18KB is not too big to be compressed
    but if you want to compress it, I suggest you to use online free css compressor like http://www.cleancss.com/
     
    51face, Sep 30, 2010 IP