Support » Plugin: WP Super Cache » Transfer-Encoding header prevents Chrome rendering

  • Resolved jkhongusc


    We run a largish WP multisite (over 400 sites). One of our sites was not able to render specific pages in Chrome and Safari; rendered fine in FF. Unfortunately it is a protected page so no-one here can view the url. This is the error message in Chrome:

    This site can’t be reached

    The webpage at might be temporarily down or it may have moved permanently to a new web address.

    I found in the meta-wp-cache-<identifier>.php file that this header caused the problem:
    “Transfer-Encoding”:”Transfer-Encoding: chunked”

    Removing that header from the json string, made the page renderable in Chrome/Safari. I had to hack wp-cache-phase1.php::wp_cache_serve_cache_file():: line 972
    if( strpos( $header, ‘Last-Modified:’ ) === false && strpos( $header, ‘Transfer-Encoding:’ ) === false)

    to make it work in our environment.

    === WP Super Cache ===
    Contributors: donncha, automattic, kraftbj
    Tags: performance,caching,wp-cache,wp-super-cache,cache
    Tested up to: 4.8.1
    Stable tag: 1.5.5

    • This topic was modified 3 years, 6 months ago by jkhongusc. Reason: added supercache version
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Donncha Ó Caoimh


    Do you have “Cache HTTP headers with page content.” enabled now? If you do, you can disable that or use the “wpsc_known_headers” to filter out “Transfer-Encoding” so that header isn’t saved when a page is cached.

    Thread Starter jkhongusc


    Donncha –
    Thanks for the feed back.

    “Cache HTTP headers with page content.” was not enabled. To fix our problem (without modifying Supercache plugin code, I did as you suggested using the wpsc_known_headers filter. I added code to a mu-plugin and it fixes our issue.


    My code snippet:

        function uscm_wpsc_known_headers ($known_headers) {
            $return_headers = array();
            foreach ($known_headers as $known_header) {
                    if (strcasecmp($known_header,'Transfer-Encoding') == 0) {
                            // Transfer-Encoding header causes rendering problems in Chrome
                    } else {
                            $return_headers[$index] = $known_header;
            return $return_headers;
    Thread Starter jkhongusc


    resolved. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Transfer-Encoding header prevents Chrome rendering’ is closed to new replies.