Coordinate Widget and localStorage - is it configurable?

3587
4
Jump to solution
12-14-2020 09:04 AM
yuruiology
New Contributor II

Hi - I've noticed that the Coordinate Widget uses localStorage to save its state - however, for some reason it uses the current path as part of the `key`. This is causing a problem for us because the url in our app changes very often, as a result, the widget is creating tons of records in localStorage very quickly.

Is this behavior configurable? Is it possible to either make it use a fixed key, or store the state in `sessionStorage` instead? (at least the records will be cleared after the session ends). 

Thanks!

0 Kudos
1 Solution

Accepted Solutions
Noah-Sager
Esri Regular Contributor

Hi @yuruiology, we have an update to share. The widget has been updated to make use of sessionStorage. This will be available at the next release (4.20), in late June or early July.

View solution in original post

0 Kudos
4 Replies
Noah-Sager
Esri Regular Contributor

Hi yuruiology, thanks for posting here. Unfortunately, I don't know of a workaround for this issue at this time. However, this sounds like a valid enhancement for the CoordinateConversion widget. We will consider this for a future release, and I'll update this thread when we get something installed.

0 Kudos
yuruiology
New Contributor II

I see, thanks! please keep us posted.

Noah-Sager
Esri Regular Contributor

Hi @yuruiology, we have an update to share. The widget has been updated to make use of sessionStorage. This will be available at the next release (4.20), in late June or early July.

0 Kudos
yuruiology
New Contributor II

Awesome, thank you!