DEV Community

Nathan Kallman
Nathan Kallman

Posted on

DEV not loading correct theme?

Starting today I've noticed that when I first visit the default theme is shown instead of my selected "Night Theme". Until after a page refresh or two and my settings take effect.

Is this happening to anyone else?

Themes (aka Dark Mode) not respected on first page loads #12455

Describe the bug

When first opening (on both mobile & desktop) or when first visiting a new area (going to the dashboard from the homepage; starting a new post) the default theme is shown. This persists for a few page refreshes before my selected theme (night theme) is shown.

To Reproduce

  1. Open a private/incognito browser window
  2. Log in
  3. The default theme is shown (instead of the one in settings)

Expected behavior

The theme selected in settings would show after logging in.


First screen after logging in: Screen Shot 2021-01-27 at 10 09 00 AM

Settings page (It was always set to Night Theme; pre-login): Screen Shot 2021-01-27 at 10 09 21 AM

Desktop (please complete the following information):

  • OS, version: macOS Catalina 10.15.7
  • Browser, version: Vivaldi 3.4.2066.90 (Stable channel) (x86_64)

Smartphone (please complete the following information):

  • Device: Samsung Note 10+
  • OS, version: Android 11.0
  • Browser, version: Chrome 88.0.4324.93

Top comments (6)

moopet profile image
Ben Sinclair

Yeah, I get similar problems. I also see notification indicators which are clearly cached from previous visits, and have to refresh to get them to disappear.
There's some kind of exciting caching happening :)

shadowtime2000 profile image

Kind of annoying cuz I hate normal light theme.

jpuls profile image
Jeff Puls

Yep, I just had to reset my theme in the mobile app. Not a huge deal, but...
my eyes

prafulla-codes profile image
Prafulla Raichurkar

Same here!

casper392945 profile image

I have the same issue

yulygp profile image

Me too!