DEV Community

Discussion on: Feedback on personal website

Collapse
 
alvaromontoro profile image
Alvaro Montoro

Thanks for the recommendations. I really like the idea of checking the user agent for color scheme preferences. At least for the default, then they could override it.

Right now I don't have routing set up on the client's side, so the pages render on the server via PHP. I used the cookie to allow PHP to know the user's preference so it could add a class and avoid a "white flash" if I changed it on load via JS. I need to work on that and replace the cookie with localStorage.

Collapse
 
dealloc profile image
Wannes Gennar

if the pages are rendered on the server side and the data is used there, then a cookie is the approperiate use case :)