wordpresscachingw3-total-cache

Does W3 Total Cache modify original css/js


I am looking to get w3 total cache going on my wordpress install.

I've done some searching, but I can't find out if the minification feature actually removes all the white space from your original css & js when you opt in for that.

I don't want to have all the white space removed, then need to make a change and have no readable code.

So ultimately I need to know whether I always have to keep my original somewhere else as another backup before turning this thing on.

Also, when you update something on your site, does w3 total cache rebuild the cache so the new post will appear on the home page for example.

Thanks for your input.


Solution

  • Well the way w3 total cache works is that it creates a cache folder in your wp-content. So after a few minutes it re-compiles all the css and js files and keep them in the cache folder. The website then directly links to these cached files, instead of your custom files.

    In short it does not modify any existing files, it just creates new cached files. And when ever you make changes to your css/js, you just have to flush the cache and it will delete the previous cached files and create a new batch of cached files.

    But your css/js files have to be enqueued, so this will let w3 total cache know which files it needs to minify and in which order. If you are using a wordpress theme then by default it should have all the enqueues in place.