Guyss a little question! I'm thinking of making a theme toggle to change the colors and the computer background in css! Is there a way to make the change persist when the user leaves and comes back? :O
Look up browser cookies. Cookies were used for this in the 1990 and 2000s. Basically a cookie is a string of text that your website will leave inside a persons web browser. When a person comes back with the same web browser your website can be programmed to read back the cookie from last time and do something with that information, like set a CSS theme.
Look up browser cookies. Cookies were used for this in the 1990 and 2000s. Basically a cookie is a string of text that your website will leave inside a persons web browser. When a person comes back with the same web browser your website can be programmed to read back the cookie from last time and do something with that information, like set a CSS theme.
The way I'm doing it is by saving the theme to localStorage!! It was a pain converting everything but so worth it. https://dev.to/marcosrjjunior/implementing-a-theme-switcher-using-javascript-347d
@inkwrought Thank you smmm you're the goat!! <3
@drewdude762 Thank you! it's a brilliant idea! :D
localStorage all the way :)
You peeps are the best <3 exactly what I was looking for!!
in localStorage we trust !!!
@s0viesweb Ill be joining the LocalStorage cult very soon ππ