• Hi,

    Across a number of servers we see an occasional issue. (hard to replicate as it only happens every so often.

    When you have the browser gzip compression option enabled, sometimes when we view the website it starts to download a file download.gz which contains a file named download which is the HTML source of the page.

    As i mentioned if i disable the gzip option its back to normal (without Gzip though) if i re-enable it and clear cache its all fine. and will be for some time – often months until someone reports it occurring again and we repeat the process.

    When its occurring im still able to login via admin.

    Any idea on what could be casuing this? we do have mod_deflate installed and apache 2.4

Viewing 10 replies - 16 through 25 (of 25 total)
  • I started experiencing this, too. Using the purge link didn’t do it, but manually deleting everything in the cache folder seems to have worked.

    For my case, I notice the same thing happens only to multi-site website. The same configuration that I exported to another single-site hosted on the same server has no such issue.

    My current workaround is to disable the Page Cache, or select Disc: Basic as Page Cache Method. Hope this helps.

    I was finding this same issue. What I was noticing is that after the HTML & XML page expires header lifetime would pass, the cache file would regenerate, but then the browser would start getting the download.gz file. I first noticed it at the root level of a multisite, but then I do a report of it happening on a regular site as well.

    Turned out to be due to enabling the Minify HTTP/2 push settings for CSS and JS. It appeared to work fine on the first cache creation, but when the cache file was replaced after expiration is when it would just download and not display anymore. Since HTTP/2 push messes with the headers to load css and js earlier the they appear in the HTML, there appears to be some bug breaking the headers when the cache files are replaced. At least that’s my theory. I just turned off those settings for now and everything appears to be back to normal for me.

    Experiencing the same issue as above. Seems to have been going on for over a year. With load time being so critical and clients becoming more aware, sad to have to disable features to get this to work. but cannot risk a live site going down for even minutes.

    Any closer to a complete solution?

    Effecting multiple sites on multiple servers.

    What was the fix mentioned some replies ago?

    atimez

    (@atimez)

    I have 2 multisites. One is ok, one has this issue. Any suggestion?

    atimez

    (@atimez)

    just disabled the gzip options of Browser Cache to fix issue.

    One of my sites has been experiencing this problem for some time now and disabling compression seems to have normalized things.

    But apparently there have been no breakthroughs in solving the problem, disabling page compression is not a solution, it’s just a shortcut to getting around the problem.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    The problem with downloading gzip files is probably that there already is a configuration in the setup that handles gzip files. If you enable gzip in Performance => Browser Cache => HTML & XML, the configuration gets messed up and the browser will download a gzip file in situations like yours. Disabling the gzip option in Performance => Browser Cache => HTML & XML will probably solve this issue.
    You can also define W3TC_PAGECACHE_STORE_COMPRESSION_OFF constant that allows not to generate _gzip and similar files. It helps in the cases when the server configuration
    doesn’t allow mime type overwrites so cached content ends up with browser
    download action.
    It’s located in /wp-content/plugins/w3-total-cache/PgCache_ContentGrabber.php line 1191

    if ( defined( ‘W3TC_PAGECACHE_STORE_COMPRESSION_OFF’ ) ) {
    return $compressions;

    }
    You just need to add define(‘W3TC_PAGECACHE_STORE_COMPRESSION_OFF’, true);

    to the wp-config.php file.

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘download.gz Downloads when viewing the site (sometimes)’ is closed to new replies.