Current time: 12-16-2017, 07:08 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GZIP doesn't work properly
04-10-2015, 01:28 AM
Post: #1
GZIP doesn't work properly
Hi everyone,
I've a doubt that I want to share with you.
I've enabled gzip compression for the site http://www.aimgroupinternational.com, but when I check the web page speed, webpagetest.org says me that I need to enable it.
What's the matter with this?
Can someone help me?
THANKS
Massimiliano
Find all posts by this user
Quote this message in a reply
04-10-2015, 06:20 AM
Post: #2
RE: GZIP doesn't work properly
Try adding this

Code:
# BEGIN Compress text files
<ifModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
  AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
  AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
  AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
  AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
  AddOutputFilterByType DEFLATE font/truetype font/opentype


  BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
</ifModule>
# END Compress text files ]

From Ozzy at ozzmodz:
http://ozzmodz.com/showthread.php/2579-S...a-htaccess

Quote:Gets me this result, WebPagetest Test Result - Dulles - 03/29/14 12:49:12

As you can see, it improved the First Byte Time from a D to a C and the Compress Transfer from a F to a A

Pretty decent gain, here is what is happening there:

Apache Module mod_deflate

When a user hits your website a call is made to your server to deliver the requested files.
The bigger these files are the longer it's going to take for them to get to your browser and appear on the screen.
Gzip compresses your webpages and style sheets before sending them over to the browser. This drastically reduces transfer time since the files are much smaller.


The reason gzip works so well in a web environment is because CSS files, JS files and HTML files use a lot of repeated text and have loads of whitespace. Since gzip compresses common strings, this can reduce the size of pages and style sheets by up to 70%!

Gzip has to be enabled on your webserver which is relatively straight forward.
When a browser visits a webserver it checks to see if the server has gzip enabled and requests the webpage. If it's enabled it receives the gzip file which is significantly smaller and if it isn't, it still receives the page, only the uncompressed version which is much larger.

Also: you will need to have two Apache modules loaded, you can verify by viewing the “Loaded Modules” under “apache2handler” configuration via phpinfo. Ensure mod_deflate and mod_headers modules are there.

If they are not there, you can either re-configure Apache to have them linked statically or load as DSO (Dynamic Shared Object).
Visit this user's website Find all posts by this user
Quote this message in a reply
04-14-2015, 05:57 PM (This post was last modified: 04-14-2015 05:58 PM by massybo@hotmail.com.)
Post: #3
RE: GZIP doesn't work properly
Thanks avalanch for replying,
I've followed your suggestions, but nothing is changed!!
I'm frustrated!
Any other idea?
Thanks in advance.
Massimiliano
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)