SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Compressing your code...

    Hi,
    I have seen various sites offering a code compression service but I can't decide if its a good idea or not. The file sizes are smaller but it looks very messy. Then again my site is designed to be viewed by a browser and so should how the raw code looks really matter?

    Comments and opinions please

    Cheers,
    Henry

  2. #2
    SitePoint Columnist Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Those services really aren't worth bothering with - your page will display the same and they'll knock a few bytes off the source code but the ugly HTML isn't worth it in my opinion. A far, far better aproach is to use gzip compression (if you can get support for it on your server) - that way pages are "zipped" up before transmission to the browser, resulting in much lower file sizes but without actually altering the HTML as the browser willl unzip it transparently when it receives the file. GZIP compression gives much smaller file sizes than source code compression as well. If you use Apache do a google search for mod_gzip for more information.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •