# Catch page / browser reload (event ?)

**URL:** <https://forum.inductiveautomation.com/t/catch-page-browser-reload-event/90726>\
**Category:** Ignition\
**Tags:** scripting, ignition81, perspective\
**Created:** [May 22, 2024, 9:44am UTC](https://forum.inductiveautomation.com/t/catch-page-browser-reload-event/90726 "2024-05-22T09:44:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taha\_Al\_Dailami](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@Taha\_Al\_Dailami](https://forum.inductiveautomation.com/u/Taha_Al_Dailami)\
**Post date:** [May 22, 2024, 9:44am UTC](https://forum.inductiveautomation.com/t/catch-page-browser-reload-event/90726/1 "2024-05-22T09:44:18Z")

</div>

Hi, my problem is about reloading the page on a refresh event (?) in perspective:

Is there any way to catch the refresh event from the browser or get the page-forward, page-backward event in perspective?

Many thanks in advance.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 22, 2024, 9:51am UTC](https://forum.inductiveautomation.com/t/catch-page-browser-reload-event/90726/2 "2024-05-22T09:51:38Z")

</div>

I think there is limited scope for this based on previous discussion in the forum.  
What problem are you trying to solve?

---

<div class="post-metadata">

**Author:** ![Taha\_Al\_Dailami](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@Taha\_Al\_Dailami](https://forum.inductiveautomation.com/u/Taha_Al_Dailami)\
**Post date:** [May 22, 2024, 10:02am UTC](https://forum.inductiveautomation.com/t/catch-page-browser-reload-event/90726/3 "2024-05-22T10:02:36Z")

</div>

I want to warn the user that he might lose his progress, for example:  
-\>navigating views - which have no URL- in a page  
-\>data that has not yet been saved.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 22, 2024, 12:02pm UTC](https://forum.inductiveautomation.com/t/catch-page-browser-reload-event/90726/4 "2024-05-22T12:02:25Z")

</div>

The refresh event, even if you could catch it, would be too late. You should alter your workflow to save in session variables as you go, then provide a final step to save to permanent storage.
