Interact with local storage
See original GitHub issueideally, something like this:
# write something to local storage
st.local_storage.a = 1
# reload the session, etc.,
# read it back
a = st.local_storage.a
Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.
If you’d like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
Using localStorage with React Hooks - LogRocket Blog
Learn how using localStorage with React Hooks can persist user information in browser storage and share logic between multiple components.
Read more >How to Use localStorage with React Hooks to Set and Get Items
localStorage is a web storage object that allows JavaScript sites and apps to keep key-value pairs in a web browser with no expiration...
Read more >Local Storage in React - Robin Wieruch
A neat custom React Hook that shows how to use local storage in React to store state. You can just use it in...
Read more >Window.localStorage - Web APIs | MDN
The localStorage read-only property of the window interface allows you to access a Storage object for the Document's origin; the stored data ...
Read more >Local Storage And How To Use It On Websites
Storing information locally on a user's computer is a powerful strategy for a developer who is creating something for the Web.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi! I also use local storage to save the results of the application so that the user can continue where he left off (closed the tab or browser). The local storage was selected because cookies have limits on the size of the stored data. Now I’m doing it with the streamlit_javascript module, but if it was native with streamlit and optimize for it would be great!
@jrieke thanks for the response! one concrete use case is for my vocabulary app built using streamlit
i would like to keep track of user scores and performance, and local storage is great because i don’t need anything server side, and user data is private.
other uses i can think of:
st.session_storage
doesn’t work because this will persist across sessions