Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter elos42

    (@elos42)

    I think that was it. I didn’t notice that it Performance>General settings>Browser cache was unchecked.

    I’ve turned that one on, and I’ve started seeing new .gz and .br files being created in cache.

    Thanks a lot.

    As a suggestion, perhaps it might be possible to have the ‘turn on/off’ box also there on the dedicated ‘Browser Cache’ settings page? It might help people unfamiliar with W3TC I guess. I missed it, cause I thought all the settings related to a particular topic, say Browser Cache, would be present on that topic’s dedicated page.

    Anyway, thanks a lot. Looks like it’s fixed for now.

    • This reply was modified 5 years, 5 months ago by elos42.
    Thread Starter elos42

    (@elos42)

    W3TC also creates this nginx configuration code in the web root. Do I need to incorporate any particular part from it into my server config for pre-compression to be triggered?

    
    # BEGIN W3TC CDN
    add_header Link "<$scheme://$host$request_uri>; rel=\"canonical\"";
    location ~ \.(ttf|ttc|otf|eot|woff|woff2|font.css)$ {
        add_header Access-Control-Allow-Origin "*";
    }
    # END W3TC CDN
    # BEGIN W3TC Page Cache cache
    # END W3TC Page Cache cache
    # BEGIN W3TC Page Cache core
    set $w3tc_rewrite 1;
    if ($request_method = POST) {
        set $w3tc_rewrite 0;
    }
    if ($query_string != "") {
        set $w3tc_rewrite 0;
    }
    if ($http_cookie ~* "(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle)") {
        set $w3tc_rewrite 0;
    }
    set $w3tc_preview "";
    if ($http_cookie ~* "(w3tc_preview)") {
        set $w3tc_preview _preview;
    }
    set $w3tc_ssl "";
    if ($scheme = https) {
        set $w3tc_ssl _ssl;
    }
    if ($http_x_forwarded_proto = 'https') {
        set $w3tc_ssl _ssl;
    }
    set $w3tc_ext "";
    if (-f "$document_root/wp-content/cache/page_enhanced/$http_host/$request_uri/_index$w3tc_ssl$w3tc_preview.html") {
      set $w3tc_ext .html;
    }
    if (-f "$document_root/wp-content/cache/page_enhanced/$http_host/$request_uri/_index$w3tc_ssl$w3tc_preview.xml") {
        set $w3tc_ext .xml;
    }
    if ($w3tc_ext = "") {
      set $w3tc_rewrite 0;
    }
    if ($w3tc_rewrite = 1) {
        rewrite .* "/wp-content/cache/page_enhanced/$http_host/$request_uri/_index$w3tc_ssl$w3tc_preview$w3tc_ext" last;
    }
    # END W3TC Page Cache core
    
    Thread Starter elos42

    (@elos42)

    Thanks Gustavo. Appreciate it much.

    Thread Starter elos42

    (@elos42)

    also, is there any way to convert the canonical link/domain/url to a specific locality (say en-US) and set up an ‘x-default’ on a subdomain?

    Currently, the plugin will add ‘x-default’ on the primary domain and there’s no way to stop it from doing that.

    For other reasons, I am not able to change my primary site address (siteurl), which is at the apex domain. Otherwise I would have done that.

    • This reply was modified 5 years, 10 months ago by elos42.
Viewing 4 replies - 1 through 4 (of 4 total)