Announcement

Collapse
No announcement yet.

mod_gzip and miva pages

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

    mod_gzip and miva pages

    I know nothing about using this apache directive and was wondering what do I need to add to the .htaccess file gzip miva pages?
    Last edited by capnhud; 03-24-10, 07:29 AM.

    #2
    Re: mod_gzip and miva pages

    This will compress html|js|css|jpg|jpeg|gif|png files. My understanding is that Miva Empresa engine does not support gzip on the mvc file format.

    Check with your host before implementing the htaccess directive to see if it is allowed.
    Code:
    AddOutputFilterByType DEFLATE text/css text/html application/x-javascript application/javascript
    <FilesMatch "\.(js|css|jpg|jpeg|gif|png)$">
    Header set Cache-Control "max-age=5184000, public"
    </FilesMatch>
    <FilesMatch "\.(html|htm)$">
    Header set Cache-Control "max-age=7200, must-revalidate"
    </FilesMatch>
    http://www.alphabetsigns.com/

    Comment


      #3
      Re: mod_gzip and miva pages

      Thank you for responding, but is what your providing tell the server?

      Comment


        #4
        Re: mod_gzip and miva pages

        I don't understand your question
        http://www.alphabetsigns.com/

        Comment


          #5
          Re: mod_gzip and miva pages

          I understand the deflate, but other part seems to pertain cache-control is that correct

          Comment


            #6
            Re: mod_gzip and miva pages

            The first part adds compression to html, javascript and css files.

            Be careful about using the second part as its not suitable for all sites; that is telling browsers that they can cache image, js and css files from that site for up to 60 days without checking that a newer version exists, so if you set that up and then change any of the files in question, your visitors could be seeing old data for quite a while if they have an old version cached. The second part tells browsers they can cache the html files for two hours.
            David Hubbard
            CIO
            Miva
            [email protected]
            http://www.miva.com

            Comment


              #7
              Re: mod_gzip and miva pages

              Thanks David for clearing that up.

              Just one more question what would mod_gzip look like?

              Would it be something like this:
              <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>
              Last edited by capnhud; 03-24-10, 08:44 AM.

              Comment


                #8
                Re: mod_gzip and miva pages

                Hi there, David:

                The first part adds compression to html, javascript and css files.
                so would you recommend doing that first part in order to speed up load times?
                Mark Romero
                ~~~~~~~~

                Comment


                  #9
                  Re: mod_gzip and miva pages

                  Originally posted by Siamese-Dream.Com View Post
                  Hi there, David:



                  so would you recommend doing that first part in order to speed up load times?
                  ONLY if you have large css or javascript files. Turning on compression for small files will be counter productive because the server is going to waste time trying to compress a file that won't benefit much from it when the file could have already been served to the client in less than the time it takes to compress + serve.
                  David Hubbard
                  CIO
                  Miva
                  [email protected]
                  http://www.miva.com

                  Comment


                    #10
                    Re: mod_gzip and miva pages

                    Hi there, David:

                    Thanks for the response:

                    ONLY if you have large css or javascript files.
                    Can I ask you how large is large? About how big can a javascript / css file get before compression becomes a viable option???

                    And would that size limit be the same for jpg or other image sizes? Or is there a different size limit for image files before compression becomes effective?

                    Thanks in advance,

                    Mark
                    Mark Romero
                    ~~~~~~~~

                    Comment


                      #11
                      Re: mod_gzip and miva pages

                      Originally posted by Siamese-Dream.Com View Post
                      Hi there, David:

                      Thanks for the response:



                      Can I ask you how large is large? About how big can a javascript / css file get before compression becomes a viable option???

                      And would that size limit be the same for jpg or other image sizes? Or is there a different size limit for image files before compression becomes effective?

                      Thanks in advance,

                      Mark
                      Images should never be compressed, the processing necessary will never result in a net gain.

                      Text-based file types can be, but I would not waste the time doing it unless you're serving more than 50 KB per file on average; i.e. if you have five css files included and one is 60 kb but the other four are 4 kb, don't compress, or merge them all into one and compress it.
                      David Hubbard
                      CIO
                      Miva
                      [email protected]
                      http://www.miva.com

                      Comment

                      Working...
                      X