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.)
- 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...
- 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...On 08/06/2015 22:43, Motty Cruz wrote:
- 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!
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 <motty.cruz@xxxxxxxxx> wrote:
- Hello,
- I am getting the following suggestions from:
- 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: users-unsubscribe@xxxxxxxxxxxxxxxx
- For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
-- 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.