Results 1 to 6 of 6
  1. #1

    gzip reliable for outputting any kind of page?

    This may sound like a silly question, but from people's experience, is gzip a reliable compression method for outputting any kind of page, or just one composed mostly of text/images? I ask this because I'm thinking of enabling gzip on our site dynamicdrive.com, which consists of sample DHTML (JavaScript) codes throughout its pages. I hate to have gzip mess things up in some browsers.

    Thanks,

  2. #2

    Re: gzip reliable for outputting any kind of page?

    Originally posted by GeorgeC
    This may sound like a silly question, but from people's experience, is gzip a reliable compression method for outputting any kind of page, or just one composed mostly of text/images? I ask this because I'm thinking of enabling gzip on our site dynamicdrive.com, which consists of sample DHTML (JavaScript) codes throughout its pages. I hate to have gzip mess things up in some browsers.

    Thanks,
    It won't make much difference to image files it they are already compressed. It's usually just used on text files. Having it on image files may create a high load on your server, and isn't recommended . It will only work with browsers that accept the encoding, so it shouldn't mess up other browsers, it should be fine with any text file. Why not try it out on certian directorys only to start with?

    HTH,
    Infinite
    Do'h!

  3. #3
    Join Date
    Jul 2002
    Posts
    153
    Just don't use it for images and you should be good to go. I believe it isn't to hard to do for simple html pages.

  4. #4

    Re: Re: gzip reliable for outputting any kind of page?

    Originally posted by infinite


    Why not try it out on certian directorys only to start with?

    HTH,
    Infinite
    Thanks for the info. Unfortuantely I don't have the luxury of testing it out, as my current host doesn't support it, and the new host I'm looking to move to has gzip installed by default.

  5. #5

    Re: Re: Re: gzip reliable for outputting any kind of page?

    Originally posted by GeorgeC


    Thanks for the info. Unfortuantely I don't have the luxury of testing it out, as my current host doesn't support it, and the new host I'm looking to move to has gzip installed by default.
    If you can use php, there is a way, you can find an example on php.net, I think. It's not mod_gzip, but it will achive the same effect (zlib compression link )

    Or you could do it this way
    ;; You can redirect all of the output of your scripts to a function. For
    ; example, if you set output_handler to "ob_gzhandler", output will be
    ; transparently compressed for browsers that support gzip or deflate encoding.
    ; Setting an output handler automatically turns on output buffering.
    ;output_handler =
    output_handler = ob_gzhandler
    But I can't see how you can do it simply, without using mod_gzip

    HTH,
    Infinite
    Do'h!

  6. #6
    Join Date
    Jan 2002
    Location
    Kuwait
    Posts
    679
    mod_gzip is very good for text.
    Including HTML, JavaScript, CSS .. etc.
    It will reduce your bandwith usage, probably to a great extent.

    Running it on images will be a waste of CPU cycles, but that's your hosts job to configure.
    Ahmad Alhashemi
    PHP, Apache, C, Python, Perl, SQL
    18 related BrainBench certificates

Posting Permissions

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