not sure what you mean with “mixed cached content”, but AO just combines all CSS it finds in a page.
if you have a separated mobile & dekstop theme, the CSS will be different and AO will inject different optimized CSS in the HTML (assuming your page cache is smart enough to differentiate).
if you desktop & mobile site are based on the same (responsive) theme then the CSS is the same and AO will inject the same combined CSS in the HTML and it’s up to the browser to apply the correct CSS depending on (mainly) viewport ( ~ browser window size).
hope this clarifies,
frank
Thanks for the quick response and clear explanation.
I think I didn’t explain my issue correctly. let me try again.
The issue is, I have a website which uses a responsive theme but it also has additional css that applied only on mobile devices (not with media query, but with custom css class) as WordPress injects a “mobile” CSS class to the body tag if the website opened on a mobile device. Which sometimes lead to the cached CSS files (optimized and combined) get served later to Desktop users.
So the solution which I thought of is to completely split cache files for each device (Desktop and Mobile) to avoid any mix up.
Hope it make sense and I was able to explain it clearly. My English isn’t that good 😁
Thanks,
Nabeel
no, AO doesn’t know about mobile or desktop. why don’t you just exclude the custom CSS from CSS optimization? 🙂
I didn’t try that, I will give it a shot … also is there a way to dynamically control the cache location on the disk? maybe a filter