-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
White flash on page refresh with dark theme #441
Comments
Hi @julienduchesne, as you can see here #350 in my comment, I said : "Just a quick note, you're maybe going to experience FOUC problems when switching themes.". |
I need to confess that I never saw this issue happening. Which browser do you guys use? |
can confirm this is happening, tested on chrome/edge chromium, both experience the same, it practically makes mode switch unusable tbh :( |
When I enable 'Bundle JS' feature of Netlify in Site Postprocessing - Asset Optimization, this problem is gone though. Edit: Found the problem.. The problem is max-age=0 for dark mode script by default.. while netlify optimization basically creates a new file and sets max-age to actually acceptable value. It could be a solution to move this script inline |
Does it have anything to do with https://themes.gohugo.io//theme/hugo-coder/post/ look at url when pressing "Blog" |
@Esgariot, I think this is the first time I've seen the flash on Firefox. But, this case looks like something different. We can easily fix it removing the redirect. |
Hi, when refreshing a page or loading a new one with the dark theme, I get a white "flash" everytime. Seems like the page goes white while the dark theme is loading.
Is this only happening to me?
Does anyone have a solution for this or is it something that would need to be fixed in the template?
As an example, it happens when I click the user name in the demo website: https://hugo-coder.netlify.app/
The text was updated successfully, but these errors were encountered: