W3 Total Cache is a really popular caching plugin for WordPress. It’s easy to set up, and using default settings you can significantly boost your site’s performance.
Default W3TC minify settings look as follows:
If your JS-dependent features stopped working after enabling JS minification, you have to:
- switch minify mode to “Manual” on W3TC Global Settings Page;
- go to minify section in W3TC configuration page;
- in JS section, click enable, then…
- pick your theme from the dropdown menu to the right of JS file management;
- now comes the tricky part – you’ll have to manually enter all js files, one by one, after pressing add a script button and Save all settings;
- remember to exclude from this list any js files used by site features which are broken
List of js files
Ok, but how do you get all your js files? It depends on a browser you’re using.
- install and enable Firebug Extension;
- open it by clicking a “bug” icon in the browser’s status bar or simply by clicking Ctrl+Shift+C ( ?+Shift+C on Mac);
- switch to Net tab;
- click JS filter at the top;
- click Domain table header to order by domain name to have JS files grouped by domain.
Now you can simply right click each js and copy it to W3TC JS minify settings.
- open developer tools by clicking Ctrl+Shift+C ( ?+Shift+C on Mac);
- switch to Network tab;
- filter Scripts at the bottom.
Now you have to copy-paste each script address by right-clicking its name, choosing Copy Link Address option and pasting it into W3TC JS minify settings.
Safari and Opera are pretty much the same.
While solving this kind of problems always require testing, I think our life would be easier if the author of W3 Total Cache changed this part of configuration a little bit. My suggestion is to change it to “exclude the following scripts from compression” because that’s what we actually want to do. You also have to remember to update this list every time you add new plugins.