Wikipedia Login Sessions and Dark Mode Setting

As a non-fiction author I make extensive use of Wikipedia pages for the Research folder. I also use my Mac and all apps exclusively in Dark Mode. Wikipedia achieves this with something called a Gadget, available when logged in. I have a large number of Research Wikipedia pages which are the conventional dark text on a white background. These are particularly jarring when you’re in the other mode most of the time. I logged into Wikipedia, enable the Gadget, then went to a standard page and used the new dropdown menu item Dark Mode to change it for my user. Navigating around, the setting is respected for all pages.

I then went into Scrivener and to my Research pages. At first, all appeared well. I clicked the Login link for the Wiki page in the Scrivener internal browser and logged in on the first one. That’s to be expected as all browsers use separate session cookies. The page changed to white on black. The next page was still showing me logged out and a cached page with the default light theme. However, clicking the Login link immediately logged me in without filling a pop-up. I ignored that minor glitch and started logging into each page to cache a Dark Mode copy - or so I thought.

I accidentally revisited a page and it had reverted to the cached default appearance. I also appeared to be logged out again. Then I noticed a pop-up saying I was “logged in centrally” advising me to refresh the page. I right clicked and used the Reload button in the internal Scrivener browser. The page refreshed but the default appearance remained and I still appeared as not logged in.

As an experiment I visited Wikipedia, copied the URL and did Add Web page. That worked perfectly, respecting my Login and new Dark Mode session settings.

It looks like some sort of cookie caching error affecting existing pages.

This isn’t really a bug in Scrivener, though we might say it’s a bit of a bug, or oversight at least, with Apple’s WebArchive format, or maybe how WebKit displays them. The issue is that this is an offline archive of the page you import, not a live browser session. This copy will remain even if the original goes offline, in other words—which is the main advantage of using it.

So the fact that you can “log in” (sort of) and change settings is a bit of a “leak” in the archive that shouldn’t ideally be allowed—but as I hinted at above, it’s not really something we can do much about since the interaction between these two pieces of Apple tech is something we’re hosting a window for, rather than having extensive browser code in the software, storing cookies, saving sessions and so on.

Another way you can look at it is that since you have next to no privacy protection when doing this, at least flushing all of the session data is the next best way of avoiding corporations tracking your use of Scrivener.

1 Like

Understood. Cheers! I’ll have to import all 50+ pages again, then.