DigitalSlideArchive/HistomicsUI

Increase data stored in the url

Opened this issue · 4 comments

We store some data in the url (e.g., image position, selected analysis task). It would be good to add frame selection, viewed annotations, task options that aren't the default, etc. so that a url could better recreate the state of the viewer.

There could be enough options that this would exceed the sensible browser url size (although this varies by browser, 2k is the same limit). Perhaps we should save this state to a database collection and have a reference to it (maybe when a sharable link is asked for?).

If we decide to look at using a database then there is the consideration of server side vs. client side. That is, if the goal is along the lines of allowing a client to restart where they left off, instead of a server-side database to interpret the user's URL, we could have a client-side cookie (or cookies) to tell the server the current state. Or some combination where the cookies would give the server some context for interpreting a URL that specified only some options.

This approach wouldn't allow a user to easily share state from one client computer to another client computer, so if that's a desired outcome then never mind.

I think sharing is a key component to this. You want to be able to share a link with a colleague.

would it be possible to use a zipped / compressed version of the query string/URL string

Maybe -- we do this in some other instances (geojs editable tutorials, for instance), and it works up to a point.