jmarantz commented on issue #1539: Will ngx_pagespeed affect the use of http / 
2 server push?
URL: 
https://github.com/apache/incubator-pagespeed-ngx/issues/1539#issuecomment-368234243
 
 
   This is a great question.  The direct answer you are asking for is that you
   can have h2 server push and still get value from ngx_pagespeed by setting:
   
      pagespeed RewriteLevel OptimizeForBandwidth;
   
   With this setting, pagespeed will not rewrite any URLs, but will just
   compress and minify contents of css/js/images.  Read more here:
   https://www.modpagespeed.com/doc/optimize-for-bandwidth
   
   However, I'm not convinced that's the best thing for your users, with the
   spotty support for h2 push in some browsers.  The blog-post you give
   references another blog post, which I encourage you to read carefully:
   https://jakearchibald.com/2017/h2-push-tougher-than-i-thought/
   
   We actually attempted to make PageSpeed automatically determine which were
   the best resources to trigger for h2 push a couple of years ago, but in
   general could not find any particular setting where we measured any kind of
   improvement visible to users.  h2 push worked, but didn't help.  The
   reasons we found were similar to those in the blog post, where in a
   bandwidth-constrained scenario you might actually block a critical resource
   with a non-critical one and make the experience worse.  Worse, you may push
   a resource already in the browser cache.  While request-cancellation might
   mitigate that partially, I'm skeptical it would really help in high-latency
   scenarios.  By the time the cancel request reaches the server from the
   browser, it may have already sent everything.
   
   It was much easier for PageSpeed to create some tangible benefit using h2
   preload, and there's an off-by-default setting for that in the the latest
   stable branch of PageSpeed.
   
     pagespeed EnableFilters hint_preload_subresources;
   
   See https://www.modpagespeed.com/doc/filter-hint-preload-subresources for
   more details.
   
   It'd be great if you could do some experiments with these various settings,
   using webpagetest.org with various settings for latency and bandwidth.  My
   thinking is that server-push does best in high-latency/high-bandwidth
   scenarios.
   
   Note that PageSpeed's inlining features for css/js/images/font-loaders
   duplicates much of the benefit of h2 push, but with less overhead and
   complete browser independence.
   
   Please try all this out and let us know what you find!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to