Experimenting with localStorage/sessionStorage - need advice, please
I'm experimenting with localStorage and sessionStorage, and just trying to get a good feel for them.
I know it's not practical (so please don't remind me.. I know..), but I've got a script that will take the local .css files, put them in sessionStorage (if they don't already exist, there), and uses them when the page loads.
Problem is: it isn't ready by the time the page loads. A refresh will work.. but that just doesn't feel right.
Currently, I'm checking for a sessionStorage variable called 'reload'; if it doesn't exist, create it and refresh the page. This kind of works, but, again, doesn't feel right.
Any suggestions/recommendations on how to get the sessionStorage CSS to load before the rest of the page?