• Resolved andrijam

    (@andrijam)


    W3 Conflict. Plug-in stop working for Mobile with W3total plugin for different cache on mobile and desktop. After manual purge it work some time until its start showing unoptimized page for Mobile.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Raul P.

    (@alignak)

    w3 total has it’s own minification feature, so you can actually use it directly without fvm.

    That being said, unoptimized pages will show up if you are logged in, or have some cookie setup. When that happens, please check with incognito mode on google chrome if it’s still unoptimized, or if it’s specific to your session.

    Also if you want to use fvm with w3t you need to disable everything related to html, css and js optimization on w3t, else they will conflict.

    Also if your server or hosting already has page caching, that could happen, as it may cache the page before it can be generated.

    • This reply was modified 2 years ago by Raul P..
    Thread Starter andrijam

    (@andrijam)

    I have been using both programs simultaneously for a long time. The problem started happening last month. Simply, when we do the fv purge, everything is ok, but when the cache is recreated with v3 automatically, then the mobile page is cached as if Fast Velocity is completely turned off, while everything is ok for the desktop. I noticed the problem through the webpagetest org site. I confirmed the error in incognito mode using mobile user agent. In v3, all minifications are turned off. At first, everything is fine, but after a while when I test, suddenly the page for mobile is not optimized. very strange`

    • This reply was modified 2 years ago by andrijam.
    • This reply was modified 2 years ago by andrijam.
    Plugin Author Raul P.

    (@alignak)

    Thanks, I also find it weird, because that means w3tcache is creating a cache file when FVM thinks that it should not be creating the min files.

    Guessing here but that “could” happen if the page is being cache expired and then some other visit triggered the cache regeneration differently, when FVM thinks it should not optimize the page.

    For example, if your site is example.com and it responds to example.com, FVM would generate the file. But if your site opens when you access the IP address directly, or if you had another virtual host pointing to that IP before that has been removed from that server (even if it did not belong to you), that could cause some bot or someone to open the url or ip, not matching your hostname.

    FVM will not generate the files or include them, if the hostname doesn’t match the actual site domain.

    Do you have some preloading feature going on (crawling to prewarm caching) active or customized somewhere?

    Is your w3tc setup to ignore certain query strings, and creating standard caching files on certain queries? FVM also does not generate css/js files for most query strings, so if a page was cached during a query string request, FVM would not process it.

    If you can export the w3tc cache settings and send them to me to info (at) fastvelocity.com I can try to replicate or make some tests.

    Thread Starter andrijam

    (@andrijam)

    For preloading I use bash scheduled in cron with mobile agent to visit all page to refresh the cache.
    I use the option for w3 to use the cached version for fb and google ads, which probably creates a problem when the cache is created exactly for that query string,
    fbclid and gclid query string. If I put the same query strings in Fast Velocity, it doesn’t help. I will send the settings for w3.

    Thanks for the support.

    Thread Starter andrijam

    (@andrijam)

    I tested it with a query string and it definitely doesn’t work when used. W3, when a page is visited with a query string, will create a cache without starting fast velocity. Is there any solution for this other than turning off query string caching. Until version 3.0 it worked fine for all query strings?

    Thread Starter andrijam

    (@andrijam)

    On desktop version it was fine because w3 preload feature, w3 auto recreate cache for desktop but that feature doesn’t work for mobile, for that reason I made a bash script, the script runs 4-5 times a day and not automatically.

    Plugin Author Raul P.

    (@alignak)

    The query generation on FVM did not change between past and latest version. FVM does not process a page when there is a query string, except for some situations where those are recognized as not changing the content (utm analytics for example).

    From what I see, w3tc preload for mobile is being worked on, but not available yet, so I understand why you made your own.
    https://www.ads-software.com/support/topic/mobile-cache-preload/

    The issue is with the settings probably, regarding query strings. There are usually two ways to cache query strings.

    One type will ignore certain query strings and cache the page as if they don’t exist. Another method caches the query strings separately, as individual different pages.

    Unless those are tracking query strings that don’t affect the displayed content, they should be cached individually.

    According to this link https://wordpress.stackexchange.com/questions/264963/w3-total-cache-site-with-query-strings when you add the query strings, they become ignored, so they effectively become the same page, so if you use query strings to show different content, probably some are broken when cache is enabled.

    Can you share your bash script?
    How you can do it for example, is to read the xml sitemap and then curl each url with a mobile useragent and again with a desktop useragent, then disable preloading on w3tc if you wish.

    Visiting each url twice, one with a desktop and another with a mobile useragent should cache the pages correctly, as there are no query strings on the sitemap (probably).

    FVM does not process pages when most query strings exist, because there are plugins and anp endpoints, using non standard url’s. Optimizing those pages, would break the api in most cases.

    Thread Starter andrijam

    (@andrijam)

    Plugin Author Raul P.

    (@alignak)

    You would need to run that script twice, with a mobile and desktop useragent separately for it to cache both versions.

    As for query strings, you can add query strings on FVM settings to be allowed. That way, minification occurs even with those query strings.

    Thread Starter andrijam

    (@andrijam)

    Hello, I found that Rank Math also resets the cache to recreate the sitemap

    For preventing I used

    add_filter( ‘rank_math/sitemap/enable_caching’, ‘__return_false’);

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Last version broke on mobile’ is closed to new replies.