• Resolved fkoomek

    (@fkoomek)


    Hello.
    Can you please explain how the plugin handle caching for mobile devices? Are pages cached differently for mobile and desktop devices?
    I don’t use a special theme for mobile, but I call for example different footers for mobile and desktop devices using wp_is_mobile() function. I noticed in some cases, that I saw the desktop footer version on mobile device. So, I thought maybe the cached version for desktop was also used for mobile.
    How does it work?

    Is there any documentation for your plugin?
    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,
    You can use User Agent Groups for this in Performance>User Agent Groups.
    Follow the instructions on that page. There you can create a group of user agents by specifying names in the user agents field. Assign a set of user agents to use a specific theme, redirect them to another domain or if an existing mobile plugin is active, create user agent groups to ensure that a unique cache is created for each user agent group. Drag and drop groups into order (if needed) to determine their priority (top -> down).

    Thread Starter fkoomek

    (@fkoomek)

    Yes, I explored that tab.
    So, in my case, is it enough to enable User agent group and define user agents? Theme is set to pass-through.
    Another question. How does preload feature work then?
    For example, I am using cron-job which visits my site once in a minute to preload pages. How to ensure that when my page is visited, both cached version for mobile and desktop are created? Is it possible?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,
    as it says in the description: Assign this group of user agents to a specific theme. Selecting “Pass-through” allows any plugin(s) (e.g. mobile plugins) to properly handle requests for these user agents. If the “redirect users to” field is not empty, this setting is ignored.

    Thread Starter fkoomek

    (@fkoomek)

    Yes, now I see that when I visit the website on mobile device, new cached page named _index_high is created. Is it possible to make creating mobile cache work with Preload feature? It seems that it doesn’t.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @fkoomek,
    With preload, you can Automatically prime page cache with the number of seconds to wait before creating another set of cached pages. unique cache is created for each user agent group

    Thread Starter fkoomek

    (@fkoomek)

    I think I understand how preload feature works, I’ve tested it carefully.
    I am just saying that for me the preload feature doesn’t work with user agents groups. Although a different version of a page is cached when I visit the website from a mobile device, it’s only created after my visit, nothing is created automatically.
    When I visit the website from PC, preload feature starts correctly working.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How does caching for mobiles work?’ is closed to new replies.