• There are (a lot of) questions i have that aren’t in FAQ and I went through all 12 pages here looking at related titles and found that only few are unanswered.

    So my question is will you, Frederick, answer my questions so that I don’t waste time in writing them? Later this could be incorporated in FAQ so others could find answers more easily.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Books have been written about web site optimization and a book can be written about W3TC as well. Please ask your questions and if they’re useful for others they will find their way into the FAQ. I don’t see the point of this question, this is how FAQs work.

    Thread Starter Milan Dini?

    (@dimadin)

    Gzip

    After looking to pgcache folder and .htaccess, my understanding is following:

    • for every page, both static html file is made and it’s gzipped (precompressed) version
    • if browser supports gzip, gziped version is sent

    This is because sending precompressed version uses less server resources then gziping on the fly?

    Is above true?

    If it is, does this conflicts with use of mod_deflate? For example, by default, in site’s root .htaccess file I add:

    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/x-javascript application/x-httpd-php application/rss+xml application/atom_xml
    </IfModule>

    If precompressed version is sent and there is this in .htaccess, will content be compressed again or Apache knows that it is already compressed and does nothing? Note that this stays in .htaccess below W3TC’s lines which are at top.

    What is difference between types of compression (gzip, deflate, gzip and deflate)? How their use have effect on server’s load and to visitor’s computer (since content needs to be decompressed and different levels of compressions requires different power and time to decompress)?

    (note that this sections applies to minifying of CSS and JS too)

    Minify

    It seems that minifying is used even when caching of page is not used. There is option to turn off minification for administrators, but what about other logged-in users, commenters, pages excluded from caching and every other situation where minification is done on every page load?

    I am asking this because HTML minification is very expensive in terms of server resources.

    Adding CSS and JS files

    Should files be added by copying whole URL (eg. https://example.net/wp-includes/js/jquery/jquery.js?ver=1.3.2) and are they after that removed only while they are with exact URL, or are they deregistered from WP (eg. what will happen when jQuery in WP is upgraded to 1.4.2: will that new script be minified and removed or only old one because of different URL)?

    What do groups mean? Are those files we add minified only for that group or what?

    What does non-blocking means for JS?

    What happens when already minified JS file is added: will it be tried to be minified again or script will recognise minification?

    Cache and headers

    Sections for expiration of cache and use of cache control headers are not explained. Questions are:

    • If we turn on cache control headers, where to setup max age of cache?
    • What is difference between “Maximum lifetime of cache objects” and “Garbage collection interval”? When someone looks at it, he can conclude that both things are related to how often W3TC regenerates caches of pages.
    • To what external files “Update external files every” applies?

    (note that this sections applies to page cache and CSS and JS too)

    Page Cache

    When pages that shouldn’t be cached are added, should we add them like https://example.net/page, /page or simply page?

    Regeneration of cache

    I read that cache is regenerated when new entry or edit was made but what if something else is updated, like RSS widget, Twitter etc?

    I’m answering here the questions that you cannot google answers for yourself:

    This is because sending precompressed version uses less server resources then gziping on the fly?

    Yes. Don’t worry about the use of mod_deflate elsewhere in your site, it’s really not relevant.

    what about other logged-in users, commenters, pages excluded from caching and every other situation where minification is done on every page load?

    You’re not understanding the point of the plugin. You can disable HTML minify if you want and in fact is not enabled by default. Disabling it for the cases you suggest defeats the purpose of the feature. Disabling it for administrators was to simplify configuration of CSS/JS minify groups.

    Should files be added by copying whole URL (eg. https://example.net/wp-includes/js/jquery/jquery.js?ver=1.3.2) and are they after that removed only while they are with exact URL, or are they deregistered from WP (eg. what will happen when jQuery in WP is upgraded to 1.4.2: will that new script be minified and removed or only old one because of different URL)?

    The FAQ does explain this. You should put the entire URI for the file in the input box when a GET string is set for it. If your HTML source outputs https://example.net/wp-includes/js/jquery/jquery.js?ver=1.3.2 then you can use wp-includes/js/jquery/jquery.js in your settings without issue. Regardless, use the test URI button to make sure that minify can find it. If you update some files in your templates, you need to update your settings. Minify is obviously matching the files that exist in your theme’s output.

    What do groups mean? Are those files we add minified only for that group or what?

    The minify settings page clearly shows groups label followed by a drop down selected list of templates. The default group means that the files specified appear in all templates and don’t need to be specified for individual templates; the other templates may have their own CSS/JS for which you can handle using the file group for template.

    What does non-blocking means for JS?

    It means that scripts will be embedded in such a way as to try to make them load asynchronously without disrupting the page render.

    What happens when already minified JS file is added: will it be tried to be minified again or script will recognise minification?

    Try and find out. Some files cannot be minified at all for numerous reasons. Whether or not a file is minified more than once is really irrelevant. Some can only be combined. You will have to experiment to determine what’s possible + optimal with your theme/plugin combinations.

    If we turn on cache control headers, where to setup max age of cache?

    It’s done for you based on the expiration time specified in your settings.

    What is difference between “Maximum lifetime of cache objects” and “Garbage collection interval”? When someone looks at it, he can conclude that both things are related to how often W3TC regenerates caches of pages.

    Just as for most of your other questions the captions explain. The lifetime of the object means how long an unchanged cache file should be saved and used. While garbage collection determines how often expired files are removed. There is no other way to explain this.

    To what external files “Update external files every” applies?

    Again I would have hoped the caption is clear. External files refer to those you do not host that you’ve specified in your CSS/JS groups. We cannot assume that they will never be updated, so minify will obtain those for you at the specified interval and use the update file the next time the cache is built.

    When pages that shouldn’t be cached are added, should we add them like https://example.net/page, /page or simply page?

    /page/ is fine, regular expressions are also supported.

    I read that cache is regenerated when new entry or edit was made but what if something else is updated, like RSS widget, Twitter etc?

    It depends on how those are implemented by the plugins you are using. You can use fragment caching in an upcoming release or use a low expiry time for your page cache files to frequently generate new cache files.

    or use a low expiry time for your page cache files to frequently generate new cache files

    Which setting controls the expiry time for page caching? I’ve tried ‘Update interval’ in the Cache Preload section. I’ve also tried setting the HTML expiry time in the Browser cache settings section. But it still seems the only way I can purge the page cache is by doing so directly through wp-admin.

    Thanks for any pointers.

    Which setting controls the expiry time for page caching?

    The “Expires header lifetime” field in the HTML section of the browser cache settings tab controls it as noted in the notes section of the page cache settings tab.

    Thanks. I missed that. So that setting dictates TTL on page cache even if you ar not using Browser cache?

    Right.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: W3 Total Cache] Undocumented features’ is closed to new replies.