# Save current dashboard state as url

**URL:** <https://community.plotly.com/t/save-current-dashboard-state-as-url/23143>\
**Category:** Dash Python\
**Created:** [May 7, 2019, 12:35am UTC](https://community.plotly.com/t/save-current-dashboard-state-as-url/23143 "2019-05-07T00:35:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ziczac](https://avatars.discourse-cdn.com/v4/letter/z/a88e4f/32.png) [@ziczac](https://community.plotly.com/u/ziczac)\
**Post date:** [May 7, 2019, 12:35am UTC](https://community.plotly.com/t/save-current-dashboard-state-as-url/23143/1 "2019-05-07T00:35:11Z")

</div>

Hi. If I have a dashboard with a number of selectors, it it possible to save the state of those selectors in some form of url so that that url can be sent to some other user and he would open a dashboard with the selectors set to the same state?

---

<div class="post-metadata">

**Author:** ![mbkupfer](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/mbkupfer/32/4334_2.png) [@mbkupfer](https://community.plotly.com/u/mbkupfer)\
**Post date:** [May 7, 2019, 4:53am UTC](https://community.plotly.com/t/save-current-dashboard-state-as-url/23143/2 "2019-05-07T04:53:22Z")

</div>

Perhaps you could implement some type of hash system that updates based on UI interactions and then make callbacks that use dcc.location. I’ve never done this before, but it was the first thought that came to mind.

---

<div class="post-metadata">

**Author:** ![ziczac](https://avatars.discourse-cdn.com/v4/letter/z/a88e4f/32.png) [@ziczac](https://community.plotly.com/u/ziczac)\
**Post date:** [May 8, 2019, 4:43am UTC](https://community.plotly.com/t/save-current-dashboard-state-as-url/23143/3 "2019-05-08T04:43:22Z")

</div>

That looks actually very promising, thanks

---

<div class="post-metadata">

**Author:** ![oegedijk](https://avatars.discourse-cdn.com/v4/letter/o/a88e57/32.png) [@oegedijk](https://community.plotly.com/u/oegedijk)\
**Post date:** [May 8, 2019, 12:50pm UTC](https://community.plotly.com/t/save-current-dashboard-state-as-url/23143/4 "2019-05-08T12:50:03Z")

</div>

I had the same issue, and built this: [https://github.com/oegedijk/dash\_querystrings](https://github.com/oegedijk/dash_querystrings)

Allows you to save the current state of the dashboard to the querystring, and reload the state as well. This really increased the amount that the dashboard got used within the company.

Let me know if you have any questions!

---

<div class="post-metadata">

**Author:** ![Damian](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@Damian](https://community.plotly.com/u/Damian)\
**Post date:** [May 8, 2019, 1:45pm UTC](https://community.plotly.com/t/save-current-dashboard-state-as-url/23143/5 "2019-05-08T13:45:42Z")

</div>

To add on to other answers you can look up the URL query string at layout time, not just callback time. I give some example code here: [Example: Creating Multi-Page and Custom-Page apps at layout time](https://community.plotly.com/t/example-creating-multi-page-and-custom-page-apps-at-layout-time/21429)

This would allow you to build something that immediately loads the correct state without having to wait for callbacks to load.
