Community
    • Login

    dark theme preference on main website doesn't work as expected.

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 5 Posters 297 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      shocked-gamer
      last edited by

      my main browser is firefox, i noticed after a browsing history (cookies, cache, etc) that the main website doesn’t remember the dark theme preference.
      i select dark theme, and after a webpage refresh it reverts to white.
      using a new and clean firefox profile doesn’t solve the issue. other browsers like chrome or edge work as expected.

      up until yesterday and before i clean my firefox browsing history, the site was remembering the dark theme preference.

      PeterJonesP Lycan ThropeL 2 Replies Last reply Reply Quote 1
      • PeterJonesP Online
        PeterJones @shocked-gamer
        last edited by PeterJones

        @shocked-gamer ,

        As far as I know, you just go down to the bottom of that main page at https://notepad-plus-plus.org/, click the button to toggle it, and then your browser should remember the cookie it sets after that.
        145b215e-0916-4cc8-990c-4d4a0b956cda-image.jpeg

        I just tried with Chrome, and it remembered my setting when I exit and reload.

        If that’s not working for you – maybe Firefox is not remembering cookies for the main domain, for some reason, so check cookie settings?


        updated, to remove the comment about auto, since after a reread of your original post, I didn’t see anything about auto, so it was irrelevant

        1 Reply Last reply Reply Quote 1
        • Lycan ThropeL Offline
          Lycan Thrope @shocked-gamer
          last edited by Lycan Thrope

          @shocked-gamer ,
          @peterjones is right. I only use Firefox myselff, and it’s in dark mode right now…however, you have to be signed in. For instance, I always sign out. When I do, the light theme comes back on, until I again, sign in. I believe it’s linked into your account, and it apparently works, or it wouldn’t go dark after I’ve signed in.

          1 Reply Last reply Reply Quote 0
          • M Offline
            myfancytextgenerator
            last edited by

            One more specific Firefox setting worth checking, since clearing your history is what started this: go to Settings > Privacy & Security, then look under “Cookies and Site Data”. If “Delete cookies and site data when Firefox is closed” is ticked, the preference cookie the theme toggle sets gets wiped every time Firefox closes, so the site can never remember your choice. The toggle itself still works for the current page load, which matches what you are seeing.

            Also worth ruling out: any privacy or ad-blocking extension that clears cookies automatically, and whether you are opening the site in a private window (cookies there never persist). As a quick test, toggle dark theme on, then check whether a cookie for the site exists afterwards — if there isn’t one, the browser isn’t storing it at all, which points back to one of the above.

            1 Reply Last reply Reply Quote 0
            • MarkusBodenseeM Offline
              MarkusBodensee
              last edited by

              @shocked-gamer
              I have the same issue on my side. Normally I have Dark Theme switched to ON when I am on Notepad++ website. But every time, when I reload the Website (preferred by just pressing F5), the Theme reverts back to Light Theme. So unfortunately it seems this setting is not remembered somewhere in the cookies.

              I have learned in the meanwhile to live with it. Since I normally restore my old session in Firefox, I am used to do a Ctrl+Tab and F5 very fast for all Tabs. So switching this Dark Theme button is my every-two-days routine when Notepad++ website was open.

              I am not logged in with some Firefox account, so could be possible, that with an account, this setting is remembered like @lycan-thrope stated.

              PeterJonesP 1 Reply Last reply Reply Quote 0
              • PeterJonesP Online
                PeterJones @MarkusBodensee
                last edited by

                @MarkusBodensee , @lycan-thrope , @shocked-gamer ,

                I cannot replicate.

                I downloaded Firefox onto a Win10 VM I have, and I ran a blank, out-of-the box copy, no configurations yet, not signed into Firefox at all. I went to https://notepad-plus-plus.org/ , opened F12 to show the Web Developer Tools, went to Storage > Local Storage, and saw https://notepad-plus-plus.org/ had KEY=darkTheme with none when I am in the site’s light mode or screen when I am in the site’s dark mode. (Please note: my experiments are all with the OS and browser in light mode; it is just the website’s light-vs-dark that I’m experimenting with.)

                I set the site’s dark mode. Refresh the page, still in dark mode, still shows darkTheme=screen. Close Firefox. Run Firefox. Go to https://notepad-plus-plus.org/. Still in Dark Mode, F12 still shows darkTheme=screen

                Maybe when you’re signed out, it uses one set of LocalStorage, and when you’re signed in, it uses another LocalStorage? That’s just a guess, and I don’t have a firefox account, and am not going to bother creating one for this. So, for someone who has the problem: when you’re signed out, if you set it to dark mode, does it stick when you exit Firefox and come back in still signed out? Hmm, re-reading @markusbodensee’s post, this disagrees with what he said. I haven’t regularly used Firefox for the better part of a decade, so I’m out of my depth here… I am just trying to add some data – specifically, that for me, with default Firefox, not logged in, it does remember. So that’s highly pointing to specifics of Firefox installation/settings/plugins/etc.

                I double-checked, and my Settings > Privacy & Security had a section called “browsing data” (not “Cookies and Site Data” as @myfancytextgenerator reported). But that section had a setting called “Clear cookies and site data every time you close Firefox”, and that defaulted to not checkmarked.

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors