Support » Plugin: W3 Total Cache » HTTP/2 push description error and query

  • Resolved jamieburchell

    (@jamieburchell)


    The text under Minify > JS > HTTP/2 push description reads:

    For better performance, send files to browser before they are requested when using the <acronym title="Hypertext Transfer Protocol">HTTP</acronym>/2 protocol. Not supported by "Disk: Enhanced" page cache method for Nginx

    It looks like the text has been HTML escaped.

    Also, HTTP/2 push doesn’t appear to be working. The .htaccess contains:

    <IfModule mod_headers.c>
        <FilesMatch "\.html[_a-z]*$">
            Header unset Link
            Header add Link '<>; rel=preload; as=script'
    
            Header add Link '<>; rel=preload; as=script'
    
            Header add Link '<>; rel=preload; as=script'
    
            Header add Link '<>; rel=preload; as=script'
    
            Header add Link '<>; rel=preload; as=script'
    
            Header add Link '<>; rel=preload; as=style'
    
            Header add Link '<>; rel=preload; as=style'
    
            Header add Link '<>; rel=preload; as=style'
    
            Header add Link '<>; rel=preload; as=style'
    
            Header add Link '<>; rel=preload; as=style'
        </FilesMatch>
    </IfModule>

    The link header PHP is sending:

    <https://example.com/wp-json/>; rel="https://api.w.org/", <https://example.com/wp-json/wp/v2/pages/138>; rel="alternate"; type="application/json", <https://example.com/>; rel=shortlink, <>; rel=preload; as=script, <>; rel=preload; as=script, <>; rel=preload; as=script, <>; rel=preload; as=script, <>; rel=preload; as=script, <>; rel=preload; as=style, <>; rel=preload; as=style, <>; rel=preload; as=style, <>; rel=preload; as=style, <>; rel=preload; as=style

Viewing 6 replies - 1 through 6 (of 6 total)
  • The feature is indeed buggy right now. I can’t even disable it, it just gets stuck in a never ending loading state if I try to do anything to it.

    Thread Starter jamieburchell

    (@jamieburchell)

    Funny you should say that @zain37 I can’t disable it without the page hanging and getting a gateway timeout error:

    [01-Dec-2022 16:35:02 UTC] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /var/www/vhosts/example.com/releases/53/web/app/plugins/w3-total-cache/Generic_AdminActions_Default.php on line 582

    Appears to be getting stuck in a recursive loop trying to remove .htaccess files.

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello @jamieburchell

    I am sorry about the issue you are experiencing with the HTTP/2 Push and I am happy to assist you with this.
    Once the feature is enabled you should be getting something like this:
    link: <https://example.com/wp-json/>; rel="https://api.w.org/", </wp-content/cache/minify/7a3b2.js?x25837>; rel=preload; as=script, </wp-content/cache/minify/3073c.js?x25837>; rel=preload; as=script, </wp-content/cache/minify/1f540.js?x25837>; rel=preload; as=script, </wp-content/cache/minify/7f17f.js?x25837>; rel=preload; as=script, </wp-content/cache/minify/97e9e.js?x25837>; rel=preload; as=script, </wp-content/cache/minify/ddcc6.js?x25837>; rel=preload; as=script, </wp-content/cache/minify/758b0.js?x25837>; rel=preload; as=script

    http/2 is a server feature so Please check and make sure it’s enabled on your server.
    If you are experiencing issues disabling the option, try to clear your browser cache and see if the problem persists.

    Thanks!

    Thread Starter jamieburchell

    (@jamieburchell)

    @vmarko There is an issue in the PHP file cited above where when the directory is “.” there is an infinite loop. I don’t think you are iterating over the array properly.

    Thread Starter jamieburchell

    (@jamieburchell)

    Infinite loop between continue and while. $file doesn’t change.

    $file = readdir( $handle );
    while ( false !== $file ) {
       if ( '.' === $file || '..' === $file ) {
          continue;
       }
    

    Generic_AdminActions_Default.php on line 582.

    Also note the issue reported above with HTML being output in the option’s description.

    .htaccess still looks like that I posted above, empty URLs.

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello @jamieburchell

    Thank you for your feedback.
    I can see that you opened a GH issue for this so the devs will try to replicate this behavior and provide the solution in the upcoming releases.
    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘HTTP/2 push description error and query’ is closed to new replies.