mod_pagespeed and http/2

469 views
Skip to first unread message

Jonathan Franks

unread,
Apr 6, 2018, 9:52:59 AM4/6/18
to mod-pagespeed-discuss
There is a brief post a few years ago about this...

PageSpeed doesn't account for HTTP/2.  For HTTP/2 traffic you probably 
want to disable combine_javascript, combine_css, and sprite_images, 
and not use ModPagespeedShardDomain.  The rest of the optimizations 
should still be valuable in an HTTP/2 environment. 

But I'm wondering what is the 2018 situation regarding using mod_pagespeed in conjunction with http/2?

Do they work well together? Is it best practice to use both of them now?

Joshua Marantz

unread,
Apr 6, 2018, 10:03:31 AM4/6/18
to mod-pagespeed-discuss
A similar question was asked on the ngx_pagespeed bug list: https://github.com/apache/incubator-pagespeed-ngx/issues/1539 and there was some discussion in that bug.


TL;DR: I think the summary you gave is still accurate: making resources smaller is still good.  Prioritizing critical css is still very good.  I think probably it's better to use H2 for combining but I don't think that's been definitively proven, and there are likely some pros & cons.  My opinion is there is more measurable benefit from pagespeed's ability to inline small resources than there is in H2-pushing them (see the above article) but I don't have data showing that, and it would be interesting to see such data, across a variety of network latencies, bandwidth, and caching scenarios.

RE image-spriting: theoretically you get value from spriting other than just fewer round trips -- it actually shares color-map information across the images which means less total bytes.  But I don't think mod_pagespeed's spriting really optimizes for that very well, and it's not something we spent a huge amount of time on after getting it to work, to be honest. Similarly, CSS-combining probably also gets value from getting all the CSS files compressed as one, with common http-headers factored out.  If you do that over H2 you still get header compression as well.



--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/a0593e31-82c1-41e9-bd04-8b45a34920d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jonathan Franks

unread,
Apr 6, 2018, 10:29:16 AM4/6/18
to mod-pagespeed-discuss
Thanks for your response. The truth is that I'm new to this with no experience of either mod_pagespeed or http/2.

My question really should have been this - As someone approaching the issue of improving website performance for the first time, would it be recommended to first try mod_pagespeed or http/2? Thanks.

Jonathan Franks

unread,
Apr 6, 2018, 3:22:07 PM4/6/18
to mod-pagesp...@googlegroups.com
Just to follow up on my last email. Having read a bit more, it seems to me that the “beginner” option would be to either use mod_pagespeed with the core filters without http/2 or mod_pagespeed with OptimizeForBandwidth with http/2.

Does anyone have advice on which option is likely to have the best results or would be considered best practice today? Or is this a situation where the only way to know which will be best is to try both and compare?

Otto van der Schaaf

unread,
Apr 8, 2018, 5:14:16 PM4/8/18
to mod-pagesp...@googlegroups.com
Re: Or is this a situation where the only way to know which will be best is to try both and compare?

I think that starting out with OptimizeForBandwidth is great, because  the reduced bandwidth should
more or less translate into a guaranteed speedup, regardless of the underlying protocol being h1 or h2.
It is possible to selectively enable filters on top of OptimizeForBandwidth. An overview of the filters can be found here:
 
Otto


On Fri, Apr 6, 2018 at 9:22 PM Jonathan Franks <jona...@ifranks.com> wrote:
Just to follow up on my last email. Having read a bit more, it seems to me that the “beginner” option would be to either use mod_pagespeed with the core filters without http/2 or mod_pagespeed with OptimizeForBandwidth with http/2.

Does anyone have advice on which option is likely to have the best results or would be considered best practice today? Or is this a situation where the only way to know which will be best is to try both and compare?

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages