the.remaking.of
July 8, 2022
Wow, it’s been a while since I posted, hold on let me just check how long… IT’S BEEN OVER A YEAR?! I guess time flies when you’re not writing a blog. Well, there’s a very good reason why I haven’t posted in so long,
Remakes are all the rage these days. The Lion King was remade in 2019. GhostBusters was remade in 2016 and then rebooted in 2021. Even The Lake House was a remake, yes the movie where Keanu Reeves and Sandra Bullock send love letters through time was actually a remake of a Korean movie made in 2000 called
list.of.gimmicks
- Replace me with someone younger and better looking.
- Rewrite the same articles, but
in Korean. - Replace me with someone who
is female. - Cast people as my children who continue my legacy of writing articles about trivial things that no one reads.
- Replace me with a dog,
people like dogs. - Start writing in an accent.
still.starving
In the end I decided to try using
- What’s an “SSR framework”?
- Why does “tech” have so many “acronyms”?
- “WHY” “DON’T” “PEOPLE” “USE” “MORE” “QUOTATION” “MARKS”?
First off, calm down. We all love quotation marks, but we should do everything in moderation. You wouldn’t eat too much ice cream
Acronyms are just like scoops of ice cream,
¿what.is.a.website?
You ever hear of a little something called
But not every computer can be accessed by the internet, for that you have to open the
But websites aren’t just text, pictures and videos, that are on can have cool features like
okay.so.what’s.the.acronym
Okay now that we understand the internet and browsers, let’s try a hypothetical. Let’s say you’re an
- Client side rendering: This is where your web browser takes code from a server and then generates a website before your very eyes.
- Server side rendering: SSR for those of you that like acronyms, this is where your website is generated on server and then sent to your browser.
- Static site generation: Which I wrote another blog entry about, is where all the pages on a website are pre-generated and are sent from a server to your web browser.
Ask someone younger for help
Some of you may be thinking, why would I ever
let.there.be.dark
So what was the issue with my beloved dark mode on my old website? Well, if you were to go to my old website and turn on dark mode and reload the page, what would you see?
Did you see it? Dear God,
The order of how the website appears in dark mode in my old website
So what’s the issue here? The issue is that the website is showing up before we have what’s necessary to show the page in dark mode. So instead of going directly to dark mode, we end up having to use this
How do we fix this egregious error? One way is to know what mode you’re in before you send the files from the server to the browser, like some sort of computer Nostradamus. And how do we know this?
c.is.for.tracking
What I use to make dark mode work in this website is the same technology that Facebook uses to track all of your internet browsing, and it’s called a cookie. What is a cookie you might ask? It’s a bit of text that is saved in you browser and is used to communicate with servers to let them know you’re logged in, and in this website’s case it’s used to save if you’re using dark mode. Our new arrow diagram looks like this:
The order of how the website appears in dark mode now
Even though there are more steps now, it doesn’t take significantly longer for the website to show up.
conclusion
By switching to using SSR instead of pre-generating my site I have fixed the problem of having light mode show up briefly on refresh, and it only took over a year to make! Well, at least