• Resolved rudolfl

    (@rudolfl)


    Hi,

    I have a weird problem here.

    Here is a page:

    https://www.hatsfromoz.com.au/category/racing-fascinators-hats-spring-summer-2022/

    I am looking at page on my phone and I can see that two buttons at the top are not working (“Filter” and “Sort”). Something to do with UCSS, I think. OK, trying to debug it on PC. Opening same page in browser and emulating mobile device. Everything is working as expected. Buttons work. Tried in FF and Chrome.

    Now, I am sure It is User Agent string. Safari browser reproduces the problem reliably. When iPhone is selected as device emulator, it sets User Agent string as iOS device. If I change it to default Safari user agent, problem disappears. Obviously, different version of page is served based on User Agent and not based on screen size.

    • This topic was modified 2 years, 1 month ago by rudolfl.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Did you enable “Cache Mobile” function?

    Thread Starter rudolfl

    (@rudolfl)

    No

    Cache Mobile is off. Never tried to enable it. I am turning options on one at a time, let cache generate, make sure it is good, then try next option.

    An update — User Agent seem to be set up correctly by Chrome on my Linux PC, but not set up correctly by Chrome on my Mac, this is how I noticed it.

    In any case, it appears that changing user agent, behavior changes. At the moment, I was able to reproduce issue on desktop, found missing CSS class, updated UCSS white list and cleared all caches. Fingers crossed, problem is gone now

    This is the completely wrong approach and inevitably leads to malfunctions and misrepresentations. If you don’t know which function has which consequences and you have little or no idea about optimizing a website, then I strongly advise you to use the presets. The problem is that there are optimization functions that are correlated with other functions. Each optimization function is therefore not alone or dependent on others.

    So do the following now: Reset all settings to the default settings. Select the recommended preset, purge the cache and test if everything works in the frontend. If yes, then you can select the next preset with more optimizations and test after each change if everything still works. This is because not every theme is compatible with every optimization setting. This also applies to the plugins.

    Plugin Support qtwrk

    (@qtwrk)

    if you have something different on mobile page and desktop page , the mobile cache must be enabled in order to differentiate the cache for different devices

    if you enabled/generated UCSS before you enable mobile cache , you may need to purge UCSS in order for it to be generated into 2 different UCSS one for mobile and one for desktop

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Different behaviour depending on User Agent’ is closed to new replies.