On a related note — we load a different set of CSS and JS for logged in vs. logged out users. Logged out users basically just see a marketing page while logged in users see more of a ‘dashboard.’ We handle this through a simple logged-in check in our functions.php to enqueue the right styles and scripts (3 total for each).
In our tests everything seems to work fine with Autoptimize and W3 Total Cache (minifying turned off), with the exception of Safari browsers which tend to hang on to the logged out CSS after logging in for some reason.
I am wondering what’s going on in the background. My read on the above is that Autoptimize will create two cached css and js files and load the right one based on the logic mentioned above. Is that right? Is there a better way to handle it?
Now that I think about it I think the Safari issue might have more to do with W3 Total Cache than Autoptimize, but thought I would bring it up in case there are any insights. Perhaps the best approach is to exclude all of our theme enqueues and simply use Autoptimize to roll up all the CSS and JS from plugins.