Hello @ivanwong201127
Thank you for your inquiry and I am happy to assist you with this.
Can you please try purging the cache and clear your browser cache and see if the issue persists?
Also, make sure to enable the ” Don’t cache pages for logged in users ” option in Performance>Page Cache, save all settings and purge the cache. I can see that you are using CDN so make sure to purge the CDN as well.
Thanks!
I have enabled “don’t cache pages for logged in users”. However, this issue comes back once in a while even though I purge the cache regularly. Is there any settings that I can do to solve this?
Besides, another issue is that when I go to a link, sometimes it will download a downloads.gz file and I cannot access the link. This issue can also be solved by purging the cache but it still comes back after a while.
Hello @ivanwong201127
Thank you for the information.
You should also disable minify for logged in users and make sure to update Media Query string in Performance>Browser Cache or Performance>Minify which will ensure that new version of styling is presented on the website.
This also means that you need to purge CDN.
As for download.gz, 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.
Thanks!