• Resolved Nicola Peluchetti

    (@nicolapeluchetti)


    Hi, I’m using the “Detect browser language” feature with a caching plugin, WP Fastest Cache. The issue is that the feature is not working, as the page is cached and thus the redirect never happens. I could deactivate the cache on the home page, but it wouldn’t make too much sense.
    What’s the best setup for using a caching solution?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chouby

    (@chouby)

    Hi,

    There are none.

    I know two ways to detect the browser language.
    1. in PHP, used by Polylang. That’s not compatible with the home page caching.
    2. in Javascript, not used by Polylang. It’s compatible with caching but that leads to an ugly redirect, *visible by the user*. The first page must indeed be loaded then the script runs and redirects to the second page.

    In Polylang 2.3, the cache will be automatically deactivated for the homepage if the browser detection is activated.

    Thread Starter Nicola Peluchetti

    (@nicolapeluchetti)

    Ok, thanks. Probably, since most of traffic comes from google searches, it makes more sense to leave the caching on and the detection feature off as google should detect the language and redirect users accordingly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘“Detect browser language” and caching plugins’ is closed to new replies.