# Reset screen after button press

**URL:** <https://discuss.streamlit.io/t/reset-screen-after-button-press/6821>\
**Category:** Using Streamlit\
**Created:** [November 1, 2020, 11:38am UTC](https://discuss.streamlit.io/t/reset-screen-after-button-press/6821 "2020-11-01T11:38:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![theimposingdwarf](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/theimposingdwarf/32/2693_2.png) [@theimposingdwarf](https://discuss.streamlit.io/u/theimposingdwarf)\
**Post date:** [November 1, 2020, 4:41pm UTC](https://discuss.streamlit.io/t/reset-screen-after-button-press/6821/2 "2020-11-01T16:41:28Z")

</div>

You are going to need a flag that tells Streamlit not to run the content preceding the button.

This can be done with either the session state implementation

> [@Multi-page app with session state](https://discuss.streamlit.io/t/multi-page-app-with-session-state/3074):
>
> Edit: Streamlit 0.84.0 has officially introduced session state. Go check it out: [Session State for Streamlit balloon](https://blog.streamlit.io/session-state-for-streamlit/) Hello there wave For a project I needed to build multi-page app with a settings page. As I’ve seen this [topic](https://discuss.streamlit.io/t/preserving-state-across-sidebar-pages/107) requesting the feature, I decided to share the solution I came up with. It features a custom version of @thiago’s [SessionState](https://gist.github.com/tvst/036da038ab3e999a64497f42de966a92). It still relies on hacks, but it should work in most cases. It was tested with Streamlit version 0.61.0 (and now 0.65). Things you must…

Or it can be done with the get/set query parameters. You could have a “reset button pusher is true” parameter that causes the page to behave differently when that parameter is in the URL

---

_[View the full topic](https://discuss.streamlit.io/t/reset-screen-after-button-press/6821)._
