Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #153340 Reply
    Miguel Ribeiro
    Guest

    Hi!

    Bought today a W3 Total Cache Pro: 1 Site License Annual Subscription.

    But it seems Cache Control of files not working. I have Browser Cache enable on General Settings. I have Set cache control header checked on Browser cache page and cache with max-age defined on Cache Control Policy option, and still no-cache showing in Network on Inspector Tools.
    Try to disable minify and cache page, and still not working.
    It shows well on first time entering the page. But on second it stops working.

    Can you help to solve this issue?

    #153356 Reply

    Hello Miguel,

    Thank you for reaching out and I am happy to help!
    I’ve checked your website and as I can see the Cache-control is set for the HTML: cache-control:
    max-age=3600, public
    However, it’s not set for static files. Can you please confirm that in the W3 Total Cache, the Cache-control header is set in Performance>Browser Cache>CSS&JS section and for Media and other files?
    Can you please share if you are possibly on Nginx+Apache environment and if you are using any proxy cache or have server settings that are setting the Browser Cache rules?
    Thanks!

    #153360 Reply
    Miguel Ribeiro
    Guest

    Thank for you reply!

    Can you please confirm that in the W3 Total Cache, the Cache-control header is set in Performance>Browser Cache>CSS&JS section and for Media and other files?

    See images:

    CSS and JS Files
    Media & Other Files

    We are using Nginx, with no proxy cache, and this rules were automatically created by W3TC Cache:

    # BEGIN W3TC Minify cache
    location ~ /wp-content/cache/minify/.*js_gzip$ {
    gzip off;
    types {}
    default_type application/x-javascript;
    add_header Content-Encoding gzip;
    expires 31536000s;
    etag on;
    if_modified_since exact;
    add_header Pragma “public”;
    add_header Cache-Control “public”;
    add_header X-Powered-By “W3 Total Cache/2.8.4”;
    add_header Referrer-Policy “no-referrer-when-downgrade”;
    add_header Vary “Accept-Encoding”;
    }
    location ~ /wp-content/cache/minify/.*css_gzip$ {
    gzip off;
    types {}
    default_type text/css;
    add_header Content-Encoding gzip;
    expires 31536000s;
    etag on;
    if_modified_since exact;
    add_header Pragma “public”;
    add_header Cache-Control “public”;
    add_header X-Powered-By “W3 Total Cache/2.8.4”;
    add_header Referrer-Policy “no-referrer-when-downgrade”;
    add_header Vary “Accept-Encoding”;
    }
    # END W3TC Minify cache
    # BEGIN W3TC Page Cache cache
    location ~ /wp-content/cache/page_enhanced.*gzip$ {
    gzip off;
    types {}
    default_type text/html;
    add_header Content-Encoding gzip;
    expires 3600s;
    etag on;
    if_modified_since exact;
    add_header Pragma “public”;
    add_header Cache-Control “public”;
    add_header X-Powered-By “W3 Total Cache/2.8.4”;
    add_header Referrer-Policy “no-referrer-when-downgrade”;
    }
    # END W3TC Page Cache cache
    # BEGIN W3TC Browser Cache
    gzip on;
    gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon application/json application/vnd.ms-access video/webm application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel;
    location ~ \.(css|htc|less|js|js2|js3|js4)$ {
    expires 31536000s;
    etag on;
    if_modified_since exact;
    add_header Pragma “public”;
    add_header Cache-Control “public”;
    add_header X-Powered-By “W3 Total Cache/2.8.4”;
    add_header Referrer-Policy “no-referrer-when-downgrade”;
    try_files $uri $uri/ /index.php?$args;
    }
    location ~ \.(html|htm|rtf|rtx|txt|xsd|xsl|xml)$ {
    expires 3600s;
    etag on;
    if_modified_since exact;
    add_header Pragma “public”;
    add_header Cache-Control “public”;
    add_header X-Powered-By “W3 Total Cache/2.8.4”;
    add_header Referrer-Policy “no-referrer-when-downgrade”;
    try_files $uri $uri/ /index.php?$args;
    }
    location ~ \.(asf|asx|wax|wmv|wmx|avi|avif|avifs|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|webp|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|webm|mpp|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|ogv|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|_ttf|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ {
    expires 31536000s;
    etag on;
    if_modified_since exact;
    add_header Pragma “public”;
    add_header Cache-Control “public”;
    add_header X-Powered-By “W3 Total Cache/2.8.4”;
    add_header Referrer-Policy “no-referrer-when-downgrade”;

    location ~* ^(?<path>.+)\.(jpe?g|png|gif)$ {
    if ( $http_accept !~* “webp|\*/\*” ) {
    break;
    }

    expires 31536000s;
    etag on;
    if_modified_since exact;
    add_header Pragma “public”;
    add_header Cache-Control “public”;
    add_header X-Powered-By “W3 Total Cache/2.8.4”;
    add_header Referrer-Policy “no-referrer-when-downgrade”;
    add_header Vary Accept;
    try_files ${path}.webp $uri /index.php?$args;
    }

    try_files $uri $uri/ /index.php?$args;
    }
    add_header Referrer-Policy “no-referrer-when-downgrade”;
    # END W3TC Browser Cache
    # BEGIN W3TC Minify core
    set $w3tc_enc “”;
    if ($http_accept_encoding ~ gzip) {
    set $w3tc_enc _gzip;
    }
    if (-f $request_filename$w3tc_enc) {
    rewrite (.*) $1$w3tc_enc break;
    }
    rewrite ^/wp-content/cache/minify/ /index.php last;
    # END W3TC Minify core
    # BEGIN W3TC Page Cache core
    set $w3tc_query_string $query_string;
    if ($w3tc_query_string ~* “^(.*?&|)_branch_match_id(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)_bta_c(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)_bta_tid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)_ga(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)_gl(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)_ke(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)adgroupid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)adid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)age\-verified(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)ao_noptimize(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)campaignid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)campid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)cn\-reloaded(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)customid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)dm_i(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)ef_id(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)epik(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)fb_action_ids(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)fb_action_types(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)fb_source(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)fbclid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)gclid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)gclsrc(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)gdffi(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)gdfms(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)gdftrk(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)hsa_acc(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)hsa_ad(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)hsa_cam(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)hsa_grp(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)hsa_kw(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)hsa_mt(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)hsa_net(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)hsa_src(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)hsa_tgt(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)hsa_ver(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)igshid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)matomo_campaign(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)matomo_cid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)matomo_content(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)matomo_group(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)matomo_keyword(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)matomo_medium(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)matomo_placement(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)matomo_source(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)mc_cid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)mc_eid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)mkcid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)mkevt(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)mkrid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)mkwid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)msclkid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)mtm_campaign(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)mtm_cid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)mtm_content(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)mtm_group(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)mtm_keyword(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)mtm_medium(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)mtm_placement(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)mtm_source(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)pcrid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)piwik_campaign(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)piwik_keyword(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)piwik_kwd(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)pk_campaign(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)pk_cid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)pk_content(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)pk_keyword(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)pk_kwd(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)pk_medium(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)pk_source(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)pp(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)redirect_log_mongo_id(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)redirect_mongo_id(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)ref(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)s_kwcid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)sb_referer_host(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)si(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)sscid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)toolid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)trk_contact(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)trk_module(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)trk_msg(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)trk_sid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)usqp(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)utm_campaign(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)utm_content(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)utm_expid(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)utm_id(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)utm_medium(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)utm_source(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~* “^(.*?&|)utm_term(=[^&]*)?(&.*|)$”) {
    set $w3tc_query_string $1$3;
    }
    if ($w3tc_query_string ~ ^[?&]+$) {
    set $w3tc_query_string “”;
    }
    set $w3tc_request_uri $request_uri;
    if ($w3tc_request_uri ~* “^([^?]+)\?”) {
    set $w3tc_request_uri $1;
    }
    set $w3tc_rewrite 1;
    if ($request_method = POST) {
    set $w3tc_rewrite 0;
    }
    if ($w3tc_query_string != “”) {
    set $w3tc_rewrite 0;
    }
    set $w3tc_slash “”;
    if ($w3tc_request_uri ~ \/$) {
    set $w3tc_slash _slash;
    }
    if ($http_cookie ~* “(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle)”) {
    set $w3tc_rewrite 0;
    }
    set $w3tc_ua “”;
    if ($http_user_agent ~* “((android|bb\d+|meego).+mobile|2.0\ mmp|240×320|\bppc\b|acer\ s100|alcatel|amoi|archos5|asus|au-mic|audiovox|avantgo|bada|benq|bird|blackberry|blazer|cdm|cellphone|cupcake|danger|ddipocket|docomo|docomo\ ht-03a|dopod|dream|elaine/3.0|ericsson|eudoraweb|fly|froyo|googlebot-mobile|haier|hiptop|hp.ipaq|htc|htc\ hero|htc\ magic|htc_dream|htc_magic|huawei|i-mobile|iemobile|iemobile/7|iemobile/7.0|iemobile/9|incognito|iphone|ipod|j-phone|kddi|konka|kwc|kyocera/wx310k|lenovo|lg|lg-gw620|lg/u990|lge\ vx|liquid\ build|maemo|midp|midp-2.0|mmef20|mmp|mobilephone|mot-mb200|mot-mb300|mot-v|motorola|msie\ 10.0|netfront|newgen|newt|nexus\ 7|nexus\ one|nintendo\ ds|nintendo\ wii|nitro|nokia|novarra|openweb|opera.mobi|opera\ mini|opera\ mobi|p160u|palm|panasonic|pantech|pdxgw|pg|philips|phone|playbook|playstation\ portable|portalmmm|proxinet|psp|qtek|s8000|sagem|samsung|samsung-s8000|sanyo|sch|sch-i800|sec|sendo|series60.*webkit|series60/5.0|sgh|sharp|sharp-tq-gx10|small|smartphone|softbank|sonyericsson|sonyericssone10|sonyericssonu20|sonyericssonx10|sph|symbian|symbian\ os|symbianos|t-mobile\ mytouch\ 3g|t-mobile\ opal|tattoo|toshiba|touch|treo|ts21i-10|up.browser|up.link|uts|vertu|vodafone|wap|webmate|webos|willcome|windows.ce|windows\ ce|winwap|xda|xoom|zte)”) {
    set $w3tc_ua _phones;
    }
    if ($http_user_agent ~* “(a1-32ab0|a210|a211|b6000-h|b8000-h|bnrv200|bntv400|darwin|gt-n8005|gt-p3105|gt-p6810|gt-p7510|hmj37|hp-tablet|hp\sslate|hp\sslatebook|ht7s3|ideatab_a1107|ideataba2109a|ideos\ss7|imm76d|ipad|k00f|kfjwi|kfot|kftt|kindle|l-06c|lg-f200k|lg-f200l|lg-f200s|m470bsa|m470bse|maxwell|me173x|mediapad|midc497|msi\senjoy\s10\splus|mz601|mz616|nexus|nookcolor|pg09410|pg41200|pmp5570c|pmp5588c|pocketbook|qmv7a|sgp311|sgpt12|shv-e230k|shw-m305w|shw-m380w|sm-p605|smarttab|sonysgp321|sph-p500|surfpad|tab07-200|tab10-201|tab465euk|tab474|tablet|tegranote|tf700t|thinkpad|viewpad|voltaire)”) {
    set $w3tc_ua _tablets;
    }
    set $w3tc_preview “”;
    if ($http_cookie ~* “(w3tc_preview)”) {
    set $w3tc_preview _preview;
    }
    set $w3tc_cookie “”;
    if ($http_cookie ~* “^(.*;)?(wptouch\-pro\-cache\-state\=mobile|wptouch\-pro\-view\=mobile)(;.*)?$”) {
    set $w3tc_cookie _mobile;
    }
    if ($http_cookie ~* “^(.*;)?(wordpress_logged_in_\.\*=.*)(;.*)?$”) {
    set $w3tc_cookie _loggedin;
    }
    set $w3tc_ssl “”;
    if ($scheme = https) {
    set $w3tc_ssl _ssl;
    }
    if ($http_x_forwarded_proto = ‘https’) {
    set $w3tc_ssl _ssl;
    }
    set $w3tc_enc “”;
    if ($http_accept_encoding ~ gzip) {
    set $w3tc_enc _gzip;
    }
    if (!-f “$document_root/wp-content/cache/page_enhanced/$http_host/$w3tc_request_uri/_index$w3tc_slash$w3tc_ua$w3tc_cookie$w3tc_ssl$w3tc_preview.html$w3tc_enc”) {
    set $w3tc_rewrite 0;
    }
    if ($w3tc_rewrite = 1) {
    rewrite .* “/wp-content/cache/page_enhanced/$http_host/$w3tc_request_uri/_index$w3tc_slash$w3tc_ua$w3tc_cookie$w3tc_ssl$w3tc_preview.html$w3tc_enc” last;
    }
    # END W3TC Page Cache core

    #153374 Reply

    Hello Miguel

    Thank you for your feedback.
    The rules are correct and are added by the W3TC.
    One thing that I see is that the static files are compressed with Brotli, instead of Gzip compression enabled in the W3 Total Cache.
    This means that something in the upper level of the website configuration is handling the static files, overriding the W3 Total Cache rules for Browser Caching
    This may be related to the Plesk configuration or you have an nginx configuration file in the upper level of the server structure that is setting those rules

    Can you please check this on your server and let me know?

    Thanks!

    #153394 Reply
    Miguel Ribeiro
    Guest

    Sorry, I thought it was sovled by activating the cache control activating this options on Plesk:

    After visiting again the no-cache appears again…

    Probably I’ll need to ask hosting support, correct?

    #153393 Reply
    Miguel Ribeiro
    Guest

    Oh ok, probably Plesk is overriding it. I’ve activated Static files and now it’s working. Maybe I can’t simply override with nginx.conf file in the root.

    I installed brotli extension and activated it, and it’s working also.

    Thank you!

    #153411 Reply

    Hey Miguel,

    Thank you for your feedback.
    I am glad I was able to help, and that everything is working as expected

    Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Cache-control not working on W3TC Pro
Your information: