• Resolved nabeel.molham

    (@nabeelmolham)


    Hi,

    Is there a way to separate mobile and desktop cache to avoid serving mixed cached content, specially with CSS?

    Maybe a filter or action to hook into

    Thanks,
    Nabeel

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    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

    Thread Starter nabeel.molham

    (@nabeelmolham)

    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

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    no, AO doesn’t know about mobile or desktop. why don’t you just exclude the custom CSS from CSS optimization? 🙂

    Thread Starter nabeel.molham

    (@nabeelmolham)

    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

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Thread Starter nabeel.molham

    (@nabeelmolham)

    Thanks

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome, feel free to leave a review of the plugin and support here! 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Separate Mobile/Desktop Cache’ is closed to new replies.