Howminimize or compress CSS and JS

Discussion in 'HTML & Website Design' started by sweet_user, Dec 15, 2008.

  1. #1
    I would like to know way to compress or minimize CSS and JS

    and what does this import function work exactly do

    <style type="text/css">
    @import url("import1.css");
    @import url "import2.css";
    </style>


    Thanks
     
    sweet_user, Dec 15, 2008 IP
  2. innovati

    innovati Peon

    Messages:
    948
    Likes Received:
    63
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Although it is possible to minimize CSS or JS, remember that they are teeny tiny text files, and they barely take up any space at all when compared to even the smallest images on your site.

    The sacrifice you make when compressing these files is that they are no able to be read easily and you will have to maintain 2 copies of the file, the original which you will use to edit, and the compressed version you keep online.

    The hassle for deploying a compressed file and maintaining to two copies isn't worth the effort unless you are running a MASSIVE site with millions of daily visits, and even then, it will amount still to only the smallest fraction of bandwidth copmared to the rest of your content.
     
    innovati, Dec 15, 2008 IP
  3. videos

    videos Peon

    Messages:
    473
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    using an external file sheet is the best way if i understand your question
     
    videos, Dec 15, 2008 IP