• It seems that some kind of cache systems, like nginx as reverse proxy or Cloudflare is caching the pages in a fixed light or dark mode, so the stored session cookie in the client browser doesn’t work. It doesn’t matter if you activate or deactivate the dark mode because when you browse into another page it doesn’t remember your previous choice. So it seems that there is some kind of problem and this plugin is not smart enough to know how to deal with statically cached pages.

    That’s why it’s needed a guide or some procedure into the plugin to avoid this or to tell the user how to setup the system to avoid this undesired behaviour. Right now it’s not working as expected. If the page is cached as dark enabled, then it’s delivered that way to the user no matter what the preferences (in a cookie) are. And if it’s cached in dark mode, it happens the same, all users receive the same dark page without considering the stored preferences into each browser.

    • This topic was modified 6 days, 2 hours ago by fidoboy.
    • This topic was modified 6 days, 2 hours ago by fidoboy.
    • This topic was modified 6 days, 2 hours ago by fidoboy.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Md. Ibrahim Khalil

    (@mdibrahimk48)

    Our plugin remembers user preferences. If a user switches modes, their preference will be retained.

    To prevent caching-related issues, you can enable the Exclude WP Dark Mode from Caching setting in our plugin – Screenshot

    Let us know if you need further assistance!

    Thread Starter fidoboy

    (@fidoboy)

    When I enable that option then there is an error into the javascript console:

    Uncaught (in promise) TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) at Function.from (<anonymous>)

    It comes from dark-mode.js

    • This reply was modified 4 days, 8 hours ago by fidoboy.
    Thread Starter fidoboy

    (@fidoboy)

    Also, when using the option to exclude from server cache the page is being completely displayed in light mode and after this, when it’s totally rendered into the browser it’s changed into dark.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.