Week 2 – storing user progress

Because a cookie is way too small to store necessary session information for the Annotator, I’ve started implementing sessionStorage and localStorage in order to maintain the application state. Two main areas of the DOM change with user interaction: the table, which is the graphical part that the user actually sees and works on; and the RDFa subtree, which is where the specifics of interactions are stored until the user is done. (The RDFa subtree is not visible to the user, mostly because the structure of information recorded there matches what the RDF conversion software requires, and it is not necessary to expose this to the user).

My main issue with sessionStorage so far, though, is that it can’t actually store DOM elements. I am getting innerHTML from the DOM and turning that into a giant string of html code before storing that in sessionStorage. For now, I can live with this, but I will keep an eye out for a way to streamline this in the future, if possible.

One Reply to “Week 2 – storing user progress”

Leave a Reply to Heather Cancel reply

Your email address will not be published. Required fields are marked *

*