WordPress.org

Forums

W3 Total Cache
- Beginner questions (24 posts)

  1. Blutarsky
    Member
    Posted 5 years ago #

    Hi there, I'm testing the plugin and trying to get the most out of it, but as I am a bit confused about it, I'm posting a sort of F.A., may be good in the future as a small reference!

    1) What does "Primed Cache" means? Is it a server side cache (enabled with the plugin) or a client/browser side cache (benefits after subsequent page loads) ?

    2) What is the best trade off about far-future expiration headers? My site is in a initial,deep-development phase; how can I cope far-future expiration headers ensuring users will get hourly/daily updates & changes to page layout?

    3) I have enabled "minifying by template", and manually added some external javascript scripts, however YSlow is still reporting a bad grade on "Make fewer HTTP requests" because the site still has some 21 external javascript files. Doesn't W3TC caches and minifies those external files, when those external files are manually added in the minify list?

    4) I do get a bad grade also on "Put JavaScript at bottom"; I have moved all the possible javascript code in the footer, however some code will not work if moved there (social icons sharing like facebook, digg, etc). Those snippets of code are scattered around the page AFTER WordPress standard header, however once the page is rendered, part of the javascript code related to those snippets is moved into the HTML header! Is W3TC doing this for some reasons or it is a well-known WP behavior? Workarounds?

    5) I get a warning in "Minify JavaScript and CSS", as there are 2 components that can be minified:
    * Inline script tag #7
    * Inline script tag #8

    What does this "inline script" means?

    6) Is there any benefit in using W3TC on shared hosting providers? Is there any chance that caching data on disk will be slower somehow in this kind of hosting solution?

    Thanks fro clarifying

  2. Blutarsky
    Member
    Posted 5 years ago #

    7) Is there any drawback in letting W3TC handle and minify scripts as google's Adsense and Analytics?

  3. efikim
    Member
    Posted 5 years ago #

    6) yes there is a benefit, both in reduced http: accesses (through minify/combine js and css) and time to load page - pages direct from disk are faster than pages where wordpress has to trawling all over the disk and database and then assemble them into a page (consuming lots of CPU time, which is likely to be as limited as disk access).
    (I'm using shared hosting and see noticeable gains)

    7) you don't want W3TC to cache external tracking scripts as they may not update the host servers if run from your own server

  4. Blutarsky
    Member
    Posted 5 years ago #

    Couldn't it be possible to force automatically W3TC to download once/twice a day those script from original sources to ensure they're up to date?

  5. efikim
    Member
    Posted 5 years ago #

    Its not just a question of them being up to date, but in which server the execution takes place. For some scripts it doesn't matter, for others it does. For example, if they need to access a database to record a page access, or a click on an ad, the script will only be able to access the database if its running on the correct server.

  6. Blutarsky
    Member
    Posted 5 years ago #

    Correct...so how can you tell if it is safe to allow W3TC to cache and minify locally a script?

  7. Blutarsky
    Member
    Posted 5 years ago #

    I have set up the plugin to use the self hosted CDN feature.
    The import media library was set to use

    Create a list of permanent (301) redirects for use in your site's .htaccess file

    without using

    Create a list of redirects to CDN (hostname specified in hostname field)

    8) Is this correct? What's the difference?

    9) The folder "wp-content/upload" did not sync. had to manually sync. Is this by design? I manually added this to the synch list.

    10) Will the plugin issue updates to the CDN, on user based web page load? That would quite bad because randomly users will be hanged awaiting for CDN sync? Maybe there's an option to schedule this using Cron?

  8. Blutarsky
    Member
    Posted 5 years ago #

    11) After enabling javascript minify, there are still some 5 external scripts running from the CDN and the original site. Why W3TC cannot combine those scripts in one unique file?

  9. Blutarsky
    Member
    Posted 5 years ago #

    12) Although having setup a self hosted CDN, I still get some 17 static components that are not on CDN. (35 on single post page, 15 belonging to Disqus!! Is the the reason why some professional bloggers switched back to other comment systems?)
    Basically Google Analytics, Adsense, Adbrite related scripts.
    Is there some way to tweak this?

  10. blau
    Member
    Posted 5 years ago #

    1) What does "Primed Cache" means?

    As I understand it, it's a server-side pre-building of cached pages.

    2) What is the best trade off about far-future expiration headers?

    The Yslow documentation says you could set a far-future expiration (a year) and then use unique names for static content, so when you change temnplate, background images etc you use a different name for each element (such as header-20100803.jpg and so on).

  11. Blutarsky
    Member
    Posted 5 years ago #

    It turns into a huge sync process.... any tip on how to tame this?

  12. Frederick Townes
    Member
    Plugin Author

    Posted 5 years ago #

    1) What does "Primed Cache" means? Is it a server side cache (enabled with the plugin) or a client/browser side cache (benefits after subsequent page loads) ?

    It means that if you have a sitemap generator the plugin will create cache files for pages that have not yet been visited by users. Normally the cache is made the first time a page is visited only.

    2) What is the best trade off about far-future expiration headers? My site is in a initial,deep-development phase; how can I cope far-future expiration headers ensuring users will get hourly/daily updates & changes to page layout?

    You obviously can't have large cache times. The trade-offs are obvious, just because you can do it doesn't mean it's appropriate for your project.

    3) I have enabled "minifying by template", and manually added some external javascript scripts, however YSlow is still reporting a bad grade on "Make fewer HTTP requests" because the site still has some 21 external javascript files. Doesn't W3TC caches and minifies those external files, when those external files are manually added in the minify list?

    Unless there are elements you can remove, or the providers of the widgets you're using will make changes to accommodate the policies YSlow prefers, there is little that can be done here if those scripts cannot be minified (statistics, analytics, ads etc for example).

    4) I do get a bad grade also on "Put JavaScript at bottom"; I have moved all the possible javascript code in the footer, however some code will not work if moved there (social icons sharing like facebook, digg, etc). Those snippets of code are scattered around the page AFTER WordPress standard header, however once the page is rendered, part of the javascript code related to those snippets is moved into the HTML header! Is W3TC doing this for some reasons or it is a well-known WP behavior? Workarounds?

    When you minify JS you can specify it's location, like above </body>. So if you still have lots of scripts above the </body> tag YSlow may still complain.

    5) I get a warning in "Minify JavaScript and CSS", as there are 2 components that can be minified:
    * Inline script tag #7
    * Inline script tag #8

    What does this "inline script" means?

    I'm not sure I follow. You mean there's a dialog that asks to confirm if you wish to minify some files?

    6) Is there any benefit in using W3TC on shared hosting providers? Is there any chance that caching data on disk will be slower somehow in this kind of hosting solution?

    Caching on any hosting account is a good idea. Shared hosts do not provide dedicated resources, so anything is possible. You need to choose settings that are most reliable for your theme/plugins/traffic. Often the defaults are a safe start.

    7) Is there any drawback in letting W3TC handle and minify scripts as google's Adsense and Analytics?

    You should not do this, the results will be unpredictable.

  13. Blutarsky
    Member
    Posted 5 years ago #

    Thanks for helping Frederick!

    If you have time to answer to 8 through 12 would help a lot!

    Thanks again, it looks like you're doing a fantastic job supporting this plugin

  14. Frederick Townes
    Member
    Plugin Author

    Posted 5 years ago #

    8) Is this correct? What's the difference?

    It depends what you want. If you want to tell search engines of the new location and have them update their records use the 301 redirect. There's usually not a need to redirect to CDN.

    9) The folder "wp-content/upload" did not sync. had to manually sync. Is this by design? I manually added this to the synch list.

    Did you ever do the media library export to bring everything into sync? It needs to be run when you first set up as the notification indicates.

    10) Will the plugin issue updates to the CDN, on user based web page load? That would quite bad because randomly users will be hanged awaiting for CDN sync? Maybe there's an option to schedule this using Cron?

    No.

    11) After enabling javascript minify, there are still some 5 external scripts running from the CDN and the original site. Why W3TC cannot combine those scripts in one unique file?

    If you haven't specified them in your configuration, they will remain in the HTML.

    12) Although having setup a self hosted CDN, I still get some 17 static components that are not on CDN. (35 on single post page, 15 belonging to Disqus!! Is the the reason why some professional bloggers switched back to other comment systems?)
    Basically Google Analytics, Adsense, Adbrite related scripts.
    Is there some way to tweak this?

    I can't speculate. However, google analytics, adsense and other ad related scripts should not be minified unless you know specifically what you are doing.

    it looks like you're doing a fantastic job supporting this plugin

    Sadly some people don't agree. :(

  15. Blutarsky
    Member
    Posted 5 years ago #

    Well, I think this is the first time EVER I get some support from a plugin author.

    Many developers out there aim to develop a plugin, and ask money for bare minimum support, including the basic one!

    Thanks Frederick :-)

  16. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    Welcome.

  17. typebee
    Member
    Posted 4 years ago #

    Can a javascript such as FancyZoom be minified? When I do, FancyZoom no longer works. Thanks, Frederick. I'm enjoying W3 Total Cache.

  18. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    Doubtful, you can try combine only to see if that works differently. Also make sure that the order of files are correct so dependencies are satisfied. Not all files can be minified, more engines will be added later to increase the likelihood that all files can be minified.

  19. typebee
    Member
    Posted 4 years ago #

    Thanks, Frederick. Using "combine only," I was able to minify two of the three Fancy Zoom files:

    /wp-fancyzoom/js-global/FancyZoomHTML.js
    /wp-fancyzoom/adddomloadevent.js

    However, /wp-fancyzoom/js-global/FancyZoom.js cannot be minified without losing the background-color on the photo title.

    Now my YSlow score is 90. Good enough!

  20. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    You might want to reach out to that author and ask them to make adjustments to the code to support minification or if you can make them and submit them to the author yourself.

  21. typebee
    Member
    Posted 4 years ago #

    hey Frederick, back in May I did email Cabel, the Fancy Zoom plugin writer, and he responded that he had never tried minifying the code and "would have to look into it someday. :)"

    Hopefully, 'someday' will come soon. ;-) I don't have the technical skill to do it myself.

  22. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    Oh ok. I'm sorry I don't have time to submit a patch to him. Hopefully someone will see this thread and be able to help out.

  23. seriocomic
    Member
    Posted 4 years ago #

    Sadly some people don't agree. :(

    I've been around these forums since they began and I can't remember anyone giving this amount of support for a plug-in. Simply outstanding.

  24. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • W3 Total Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic