I have created two buttons and I am able to change my stylesheet once I click on these buttons. However when I go to the next page on my website the stylesheet reverts back to the original and does not stay how the user set it. I was wondering how this would be tackled...
1 Answer
Store preferred style in a cookie or localStorage.
If you use a cookie then you can set proper one at server which would prevent style flash.
Alternatively use script when page loads to read cookie or localStorage and append preferred stylesheet to <head> accordingly
Both methods are easy to research