Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

W3 total cache caches pages for HTTPS 'uniquely' what does that mean?

W3 total cache reads:

Cache SSL (https) requests Cache SSL requests (uniquely) for improved performance.

enter image description here

now i want hard caching for all pages, if https or not, that always a cached version is returned. Thing is, i cannot disable https for the pages, as we would be ranking lower on google, as non https gives you a penalty nowadays.

what does this sentence really mean?

like image 950
Toskan Avatar asked Dec 28 '16 14:12

Toskan


People also ask

What does W3 Total cache do?

W3 Total Cache (W3TC) improves the SEO, Core Web Vitals and overall user experience of your site by increasing website performance and reducing load times by leveraging features like content delivery network (CDN) integration and the latest best practices.

What is W3 cache?

W3 Total Cache is a WordPress plug-in designed to accelerate a website's load-times and enhance the overall UX. The plug-in uses caches and CDN integration to improve the hosting server's performance, thereby creating a more seamless experience for site visitors.

Where does W3 Total cache store files?

W3 Total Cache W3TC stores its cache data in /wp-content/cache/all.


1 Answers

Short version: this means that the page caching rules will not cache HTTPS specific pages by default. So (http : // example . com / page1) would be cached but (https :// example.com / page2) would not be.
Making this true then cause the cache to automatically create a specific SSL version of the page cache.

By default the option is set to false:

'pgcache.cache.ssl' => array(
        'type' => 'boolean',
        'default' => false

If set to true then:

/**
         * Set HTTPS
         */
        if ( $config->get_boolean( 'pgcache.cache.ssl' ) ) {
            $rules .= "    RewriteCond %{HTTPS} =on\n";
            $rules .= "    RewriteRule .* - [E=W3TC_SSL:_ssl]\n";
            $rules .= "    RewriteCond %{SERVER_PORT} =443\n";
            $rules .= "    RewriteRule .* - [E=W3TC_SSL:_ssl]\n";
            $env_W3TC_SSL = '%{ENV:W3TC_SSL}';
        }
like image 153
mcdwayne Avatar answered Oct 10 '22 17:10

mcdwayne