GZIP compression Question

Discussion in 'HTML & Website Design' started by mbadboyz, Dec 31, 2010.

  1. #1
    Hi,

    Does anyone know how to install GZIP compression into the website to allow it to load faster if the website Browser is GZIP enabled ??


    Thanks
     
    mbadboyz, Dec 31, 2010 IP
  2. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think most web servers already have it installed, you just need to turn it on. For an Apache server, I think that involves enabling mod_deflate.
     
    Cash Nebula, Jan 3, 2011 IP
  3. mbadboyz

    mbadboyz Greenhorn

    Messages:
    65
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    20
    #3
    Hi, thanks for your Help, I found a way of doing it on my host, where the mod_deflate doesn't work. But I found away of allowing the website on the host address to be GZIP'ed within the .htaccess file. only two lines of code needed.

    Cheers for your help Job sorted.
     
    mbadboyz, Jan 3, 2011 IP
  4. interkiwiwebdevelopers

    interkiwiwebdevelopers Active Member

    Messages:
    109
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #4
    Yeah I'm interested too... I currently host my sites through Godaddy and have tried GZip compression on them before but it doesn't work...
     
    interkiwiwebdevelopers, Jan 4, 2011 IP
  5. mbadboyz

    mbadboyz Greenhorn

    Messages:
    65
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    20
    #5
    DO you hvae access to the .htaccess file on the root: public/... area of the website, sometimes seen in the FTP servers?
     
    mbadboyz, Jan 4, 2011 IP
  6. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #6
    AFAIK GoDaddy had mod_deflate (that is responsible for gzip content compression on Apache 2 webservers) disabled.

    I am not sure if they enabled it yet, you should ask them in their forums.

    If you added e.g.

    
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript image/png image/jpeg image/gif
    
    Code (markup):
    to your .htaccess file, which would send compressed html files, plain text files, css files, js files, png files, jpg files and gif files to your visitors browsers and you do not have mod_deflate installed/activated... it wouldn't work.

    If you need more info: http://www.cookielessdomain.com/blog/

    Good luck
     
    CSM, Jan 4, 2011 IP
  7. interkiwiwebdevelopers

    interkiwiwebdevelopers Active Member

    Messages:
    109
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #7
    Yeah I do, have tried numerous times before but have yet to make it work. I only was told about Gzip compression last year so am still new with that regard, but I see how essential it can be, especially for large pages. PM me with your thoughts (and post it to this thread), am keen to finally get it working :).
     
    interkiwiwebdevelopers, Jan 4, 2011 IP
  8. mbadboyz

    mbadboyz Greenhorn

    Messages:
    65
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    20
    #8
    I heard about it before, but only the last 2 months ive been working on GZIP because I can also see how important it is to have it enabled.

    If you have access to the .htaccess file, make a copy of it and post it on here, And I will repost it with GZIP enabled, then all you do upload it to your host root, and then run a test at: http://www.gidnetwork.com/tools/gzip-test.php

    If it shoes 'YES' then your Gzip is working, If 'NO' then we can go from there. :):D
     
    mbadboyz, Jan 5, 2011 IP
  9. interkiwiwebdevelopers

    interkiwiwebdevelopers Active Member

    Messages:
    109
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #9
    I just spent the last hour converting all my site's html pages to php pages and enabled GZIP via php and it works :D. I also redirected any requests for my old html pages to the new php versions via .htaccess, and used the 301 redirect as well. If you want to test my site on a GZIP test site (like mbadboyz pointed out), my site is:

    http://www.interkiwiwebdevelopers.com
    Code (markup):
    And hey, I didn't stop there... I decided to try and implement recaptcha with my "Contact Us" form after trying for so long and woohoo it worked!
     
    interkiwiwebdevelopers, Jan 5, 2011 IP
  10. interkiwiwebdevelopers

    interkiwiwebdevelopers Active Member

    Messages:
    109
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #10
    If you want the source code let me know and I will pm it to you. I will have to blank out a couple of small parts of it because I don't want to go share my private and public recaptcher keys with anyone :p.
     
    interkiwiwebdevelopers, Jan 5, 2011 IP
  11. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #11
    Enabling gzip via php is not the right solution.

    Always use the server-side gzip compression via mod_deflate (if it is an Apache). Then you can gzip images, html, css, javascript and other media files (like flash files, ...).

    Nearly every webhoster should have mod_deflate enabled.
     
    CSM, Jan 5, 2011 IP
  12. interkiwiwebdevelopers

    interkiwiwebdevelopers Active Member

    Messages:
    109
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #12
    Oh ok, how do you go about doing do you put some code in your .htaccess file? Need the exact instructions and code because have never tried to do it in this way before...
     
    interkiwiwebdevelopers, Jan 5, 2011 IP
  13. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
  14. interkiwiwebdevelopers

    interkiwiwebdevelopers Active Member

    Messages:
    109
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #14
    I tried what was said in that thread/post but just got a 500 error so Godaddy mustn't have it enabled. Probably have to upgrade my hosting package in order for them to do so. Compressing via php seems to have sped up my site a bit but compressing all images would produce better results. If anyone has Godaddy hosting and has successfully compressed their images etc let me know...
     
    interkiwiwebdevelopers, Jan 5, 2011 IP
  15. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #15
    As I said, ask your hoster about mod_deflate
     
    CSM, Jan 6, 2011 IP
  16. faca5

    faca5 Greenhorn

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #16
    Hello.

    You can enable on server of in php application. Visit php.net for correct command
    ini_set('gzip_compression', true something like that but use if broswer doesnt have enabled gzip compresssion
     
    faca5, Jan 6, 2011 IP
  17. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #17
    If you would read through the posts you should have noticed that this "technique" was already mentioned!!!
     
    CSM, Jan 6, 2011 IP