httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stormy <storm...@stormy.ca>
Subject Re: [users@httpd] Apache24 - how to optimize httpd.conf
Date Tue, 09 Jun 2015 13:30:16 GMT
At 09:24 AM 6/9/2015 +0100, James Smith wrote:
[snip good advice]
>    * For minifying CSS/JS: look at yui compressor and google closure 
> compiler...  (Use jshint to check your js to make sure that it will 
> merge/compress OK)
>    * Can use a number of build tools to do some of this auto-magically...
One possible caveat -- "mod_pagespeed" which is from Google dev (the start 
of this thread.)  We tried it in a pre-production 2.4 environment, and 
while most of the output was well rewritten/minified/re-ordered, it put an 
enormous hit on server CPU cycles (on a very fast machine) -- to the point 
that end-user browser load times suffered. We had to drop it.  (Note this 
was for a fairly complex perl/js site, so YMMV. Note also that Google do 
not *now* recommend it for 2.4, only 2.2, if I understand their notes 
correctly.)

Best -- Paul

>    * Move (most) JS to the foot of the page....
>
>Watch out with minifying HTML - there is a minor bug with most of the 
>minifiers which which can't handle correctly ends of line after tags, and 
>if you have gzip encoding it usually doesn't make a difference!
>
>Finally...
>    * Look at your code and try and optimize your HTML { put as much 
> presentation as possible into CSS }
>    * Look at your JS - don't use multiple "library classes" - I have seen 
> sites using jQuery, Scriptaculous and YUI at the same time!
>
>On 08/06/2015 22:43, Motty Cruz wrote:
>>Hello,
>>I added this code on .htaccess
>>
>><IfModule mod_mime.c>
>>  AddType application/x-javascript .js
>>  AddType text/css .css
>></IfModule>
>><IfModule mod_deflate.c>
>>  AddOutputFilterByType DEFLATE text/css application/x-javascript 
>> text/x-component text/html text/richtext image/svg+xml text/plain 
>> text/xsd text/xsl text/xml image/x-icon application/javascript
>>  <IfModule mod_setenvif.c>
>>   BrowserMatch ^Mozilla/4 gzip-only-text/html
>>   BrowserMatch ^Mozilla/4\.0[678] no-gzip
>>   BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
>>  </IfModule>
>>  <IfModule mod_headers.c>
>>   Header append Vary User-Agent env=!dont-vary
>>  </IfModule>
>></IfModule>
>>
>>does not seem to make a difference!
>>
>>
>>
>>
>>On 06/08/2015 02:38 PM, Emir Ibrahimbegovic wrote:
>>>What have you tried?
>>>
>>>On Mon, Jun 8, 2015 at 5:35 PM, Motty Cruz 
>>><<mailto:motty.cruz@gmail.com>motty.cruz@gmail.com> wrote:
>>>Hello,
>>>I am getting the following suggestions from:
>>><https://developers.google.com/speed/pagespeed/insights/>https://developers.google.com/speed/pagespeed/insights/
>>>
>>>
>>>Should Fix:
>>>Optimize images
>>>Leverage browser caching
>>>Consider Fixing:
>>>Eliminate render-blocking JavaScript and CSS in above-the-fold content
>>>Minify CSS
>>>Minify HTML
>>>
>>>What is the best practice to solve errors above?
>>>
>>>Thanks,
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: 
>>><mailto:users-unsubscribe@httpd.apache.org>users-unsubscribe@httpd.apache.org
>>>For additional commands, e-mail: 
>>><mailto:users-help@httpd.apache.org>users-help@httpd.apache.org
>>>
>
>
>-- The Wellcome Trust Sanger Institute is operated by Genome Research 
>Limited, a charity registered in England with number 1021457 and a company 
>registered in England with number 2742969, whose registered office is 215 
>Euston Road, London, NW1 2BE.

Mime
View raw message