Announcement

Collapse
No announcement yet.

Page compression on 1&1

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Page compression on 1&1

    With Google now adding page load speed to their ranking algorithm, does anyone know how to get gzip working on 1&1. I've tried every suggestion I can find on web but all seem to give 500 server error.

    1&1 suport will only confirm that gzip is enabled but will not give any assistance in configuration of htaccess etc. (job's worth!!!)

    Anyone sorted this?
    Alan Johnson

    Quality Parrot Cages & Accessories by Parrotize UK
    Pet Accessories by Animal Instinct

    #2
    If you are referring to getting v9 compression working in the network settings then it shoujd just work automatically with 1and1, there's nothing else to do.

    I believe all my 1and1 hosted sites work with compression without any htaccess config etc.

    Comment


      #3
      i think you are talking about this

      http://code.google.com/speed/page-sp...zipCompression

      cant help with 1&1 though

      Comment


        #4
        Yes. That's what I am talking about Jo.

        Anyway found a solution here for anyone else with same issue:
        http://mrrena.blogspot.com/2009/01/h...ther-text.html
        Alan Johnson

        Quality Parrot Cages & Accessories by Parrotize UK
        Pet Accessories by Animal Instinct

        Comment


          #5
          I am not on 1and1 but would like to get gzip working for our site as the stats in Google webmaster tools are showing that it is relatively slow.

          I have come across the following:

          http://www.blog.highub.com/apache/ht...dwidth-saving/

          which states:

          If you can use htaccess on your server and want to use gzip for faster Page Load Times / Bandwidth Saver. You can put the following lines in the htaccess file on your server:


          <IfModule mod_gzip.c>
          mod_gzip_on Yes
          mod_gzip_dechunk Yes
          mod_gzip_item_include file \.(html?|txt|css|js|php|pl|jpg|png|gif)$
          mod_gzip_item_include handler ^cgi-script$
          mod_gzip_item_include mime ^text/.*
          mod_gzip_item_include mime ^application/x-javascript.*
          mod_gzip_item_exclude mime ^image/.*
          mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
          </IfModule>


          Would this be safe to add to our htaccess file for our actinic site on Apache/2.2.3 server.

          Thanks
          Rob
          For all your car, motorcycle and marine care, cleaning and detailing products.

          Comment


            #6
            When I looked around the net I came across dozens of different variations, but the one I used was to add the following into the .htaccess file

            # compress all text, js, css & html:
            AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
            Darren Guppy
            Golf Tee Warehouse
            Golf Tees and Golf Accessories.

            Comment


              #7
              Thanks Darren

              Do you paste it in just a shown in your post?
              Rob
              For all your car, motorcycle and marine care, cleaning and detailing products.

              Comment


                #8
                Yes, that's what I have done
                The first line is not really required, but is a comment line stating what the following line does so in the future you have a chance of remembering.
                Darren Guppy
                Golf Tee Warehouse
                Golf Tees and Golf Accessories.

                Comment


                  #9
                  Darren

                  Brilliant

                  Seems to be working perfectly.

                  Thanks for your help on this one.
                  Rob
                  For all your car, motorcycle and marine care, cleaning and detailing products.

                  Comment


                    #10
                    Has anyone any figures on how much difference gzip has made to their own site on webmaster tools? Does the graph show a significant improvement?

                    The other thing I'm wondering about is blocking Google from the cgi-bin (as long as you aren't linking pages via the scripts). Pages served via the scripts are all going to be slower than straightforward html pages. Those that are just doing a re-direct shouldn't be too bad. The cart and checkout pages might appear slow though.

                    Mike
                    -----------------------------------------

                    First Tackle - Fly Fishing and Game Angling

                    -----------------------------------------

                    Comment


                      #11
                      Robert,

                      I have updated the line of code to add into the htaccess file in my earlier post as on checking today I see that the javascript files were not being compressed as I had used text/javascript and seems I should have used application/x-javascript (although I have seen both 'application/x-javascript' and 'application/javascript' and may depend on your server - probably nest to test both). I am sure it was working when I tested it last month.

                      I have used http://www.gidnetwork.com/tools/gzip-test.php ro check eash file type. Don't just enter the home page url as they will only test the html files, I would suggest entering the direct url of a css file and a js file to check that css files and javscript files are also working.


                      Mike,

                      I implemented Gzip around 1 month ago and also removed a lot of excess code from my actinic.css file but neither has resulted in any apparent improvement on the graphs in Google Webmaster Tools.

                      I block google's access to the CGI-BIN in my robots file, although the reason was to encourage google to index the proper URL of a product rather than it's cgi-bin link it was oicking up from best sellers and new product lists.
                      Darren Guppy
                      Golf Tee Warehouse
                      Golf Tees and Golf Accessories.

                      Comment


                        #12
                        Google's Page Speed recommendations are very interesting indeed and are based on improving the speed and delivery of your website from server to browser, including the rendering speed of the HTML and code in the browser as well.
                        GZIP compression is just one aspect.
                        Another element to look at is utilising browser caching. This reduces overall load times and helps with website performance as well:

                        You can implement browser caching through the htaccess file as well with something like:

                        Code:
                        # Turn on Expires and set default to 0 
                         ExpiresActive On 
                         ExpiresDefault A0 
                         
                        # Set up caching on media files for 1 year (forever?) 
                         <FilesMatch ".(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$"> 
                         ExpiresDefault A29030400 
                         Header append Cache-Control "public" 
                         </FilesMatch> 
                         
                        # Set up caching on media files for 1 week 
                         <FilesMatch ".(gif|jpg|jpeg|png|swf)$"> 
                         ExpiresDefault A604800 
                         Header append Cache-Control "public" 
                         </FilesMatch> 
                         
                        # Set up 2 Hour caching on commonly updated files 
                         <FilesMatch ".(xml|txt|html|js|css)$"> 
                         ExpiresDefault A7200 
                         Header append Cache-Control "proxy-revalidate" 
                         </FilesMatch> 
                         
                        # Force no caching for dynamic files 
                         <FilesMatch ".(php|cgi|pl|htm)$"> 
                         ExpiresActive Off 
                         Header set Cache-Control "private, no-cache, no-store, 
                         proxy-revalidate, no-transform" 
                         Header set Pragma "no-cache" 
                         
                        </FilesMatch>
                        We always recommend that the first priority is to optimise the existing HTML, CSS, images and javascript on your website so that you get the best possible performance prior to any compression or caching.
                        We have seen some significant improvement in websites who have had their HTML/CSS overhauled with properly optimised images and CSS and javascript code as opposed to those sites that only implement GZIP or caching.
                        The rendering speed in the browser can be significantly improved asl well, which all adds up to a better experience for the customer.
                        Fergus Weir - teclan ltd
                        Ecommerce Digital Marketing

                        SellerDeck Responsive Web Design

                        SellerDeck Hosting
                        SellerDeck Digital Marketing

                        Comment


                          #13
                          We have also set-up browser caching (hopefully correctly) and have added the following to the htaccess file, although were undecided exactly what values to use.

                          <IfModule mod_expires.c>
                          ExpiresActive On
                          ExpiresDefault "access plus 1 seconds"
                          ExpiresByType text/html "access plus 1 seconds"
                          ExpiresByType image/gif "access plus 12 hours"
                          ExpiresByType image/jpeg "access plus 12 hours"
                          ExpiresByType image/png "access plus 12 hours"
                          ExpiresByType image/ico "access plus 4 months"
                          ExpiresByType text/css "access plus 4 hours"
                          ExpiresByType text/javascript "access plus 2 weeks"
                          ExpiresByType text/xml "access plus 4 hours"
                          </IfModule>
                          Most of our images should already be optimized and are page load speeds seem to be fairly decent when I have compared them to our competitors as we are usually the first or second fastest when compared to our top 8 competitors.
                          Darren Guppy
                          Golf Tee Warehouse
                          Golf Tees and Golf Accessories.

                          Comment


                            #14
                            How does this compare to the standard browser caching which generally works on size rather than duration? Does it override it?

                            Comment


                              #15
                              I think the 'expires' stuff only tells the browser how long the content is valid for.

                              The browser will still use it's own cache settings, but might fetch fresh data if the content expiry time is earlier than the cache setting.

                              Mike
                              -----------------------------------------

                              First Tackle - Fly Fishing and Game Angling

                              -----------------------------------------

                              Comment

                              Working...
                              X