• Resolved Han Leentvaar

    (@hleenwp)


    Hi, I am really happy with this plugin and it is installed on all my sites.
    But on this one, the home page is not cached, while all other pages are.
    Even the pages in the second language (I use PolyLang).
    Can you advise me? Thanks in advance!

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Han Leentvaar

    (@hleenwp)

    Found the cause: when I disable “Detect browser language” in Polylang, the home page is cached.
    However, I would like to use that setting…

    PolyLang documentation says: “When activated, someone visiting your homepage for the first time is redirected to the homepage in the language according to his browser preferences.”

    So, a redirect occurs, causing the page not to be cached. Can this be prevented somehow? The page is visited after the redirect, so why no caching?

    Also found in a blog post of PolyLang:
    “We also worked to improve the compatibility with cache plugins. As cache plugins don’t send the language cookie with the cached page, the cookie is now set in javascript when a cache plugin is active. Also the home page is automatically removed from the cache if you activate the browser preferred language detection. The test were made with WP Rocket, but the changes should apply to other cache plugins. A special case was handled for WP Fastest cache.”

    Have you also opened a support thread with PolyLang for this? It sounds as though perhaps a change might be required on their end as “A special case was handled for WP Fastest cache.”.

    Thread Starter Han Leentvaar

    (@hleenwp)

    No, I did not ask…
    I have no paid account (so no support) and from what I read in the documentation, I think they built it in for a purpose (as the cache does not supply cookies). So I disabled the language detection and leave it to the visitor to switch manually.
    Thanks for your attention!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Home page is not cached; all others are’ is closed to new replies.