# Unloading Bubble page

**URL:** <https://forum.bubble.io/t/unloading-bubble-page/144954>\
**Category:** Plugin builders\
**Created:** [April 6, 2021, 9:18am UTC](https://forum.bubble.io/t/unloading-bubble-page/144954 "2021-04-06T09:18:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nocodeventure](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/nocodeventure/32/247164_2.png) [@nocodeventure](https://forum.bubble.io/u/nocodeventure)\
**Post date:** [April 6, 2021, 9:18am UTC](https://forum.bubble.io/t/unloading-bubble-page/144954/1 "2021-04-06T09:18:15Z")

</div>

Dear Bubble Builders,

How can I unload a Bubble page? I’m trying to fire an event that triggers a redirect to a hosted login page. The alert says “Changes you’ve made are possibly not saved, are you sure you wish to continue?”

The redirect is working fine. Hope to get some feedback soon.

---

<div class="post-metadata">

**Author:** ![jared.gibb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jared.gibb/32/123329_2.png) [@jared.gibb](https://forum.bubble.io/u/jared.gibb)\
**Post date:** [April 6, 2021, 9:57am UTC](https://forum.bubble.io/t/unloading-bubble-page/144954/2 "2021-04-06T09:57:14Z")

</div>

> [@nocodeventure](#):
>
> Changes you’ve made are possibly not saved, are you sure you wish to continue?”

Have you tried including

```
window.onbeforeunload = null;

```

---

<div class="post-metadata">

**Author:** ![nocodeventure](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/nocodeventure/32/247164_2.png) [@nocodeventure](https://forum.bubble.io/u/nocodeventure)\
**Post date:** [April 6, 2021, 10:34am UTC](https://forum.bubble.io/t/unloading-bubble-page/144954/3 "2021-04-06T10:34:51Z")

</div>

> [@jared.gibb](#):
>
> ```auto
> window.onbeforeunload = null;
> 
> ```

Let me try that right now

---

<div class="post-metadata">

**Author:** ![nocodeventure](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/nocodeventure/32/247164_2.png) [@nocodeventure](https://forum.bubble.io/u/nocodeventure)\
**Post date:** [April 6, 2021, 10:36am UTC](https://forum.bubble.io/t/unloading-bubble-page/144954/4 "2021-04-06T10:36:05Z")

</div>

@jared.gibb it worked like a charm! 🤩

> [@jared.gibb](#):
>
> ```auto
> window.onbeforeunload = null;
> 
> ```

Thanks Jared

---

<div class="post-metadata">

**Author:** ![JohnMark](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnmark/32/42431_2.png) [@JohnMark](https://forum.bubble.io/u/JohnMark)\
**Post date:** [April 6, 2021, 12:01pm UTC](https://forum.bubble.io/t/unloading-bubble-page/144954/5 "2021-04-06T12:01:05Z")

</div>

You must flag Jared as “Solution” 😅

---

<div class="post-metadata">

**Author:** ![nocodeventure](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/nocodeventure/32/247164_2.png) [@nocodeventure](https://forum.bubble.io/u/nocodeventure)\
**Post date:** [April 6, 2021, 12:44pm UTC](https://forum.bubble.io/t/unloading-bubble-page/144954/6 "2021-04-06T12:44:42Z")

</div>

That’s true, I will send a post request to Jared

---

<div class="post-metadata">

**Author:** ![ezhang](https://avatars.discourse-cdn.com/v4/letter/e/22d042/32.png) [@ezhang](https://forum.bubble.io/u/ezhang)\
**Post date:** [July 1, 2021, 3:35pm UTC](https://forum.bubble.io/t/unloading-bubble-page/144954/7 "2021-07-01T15:35:01Z")

</div>

Hi @nocodeventure,

I was trying to build something like what you did here. Can you please share how you detect the page unload and trigger an event?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![nocodeventure](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/nocodeventure/32/247164_2.png) [@nocodeventure](https://forum.bubble.io/u/nocodeventure)\
**Post date:** [July 1, 2021, 3:47pm UTC](https://forum.bubble.io/t/unloading-bubble-page/144954/8 "2021-07-01T15:47:17Z")

</div>

Custom code it with a Plugin or script on the page that unloads the page using the command above. I can’t dive into the details as it should be clear from the information above.

---

<div class="post-metadata">

**Author:** ![sathiya.s](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@sathiya.s](https://forum.bubble.io/u/sathiya.s)\
**Post date:** [May 2, 2023, 4:36am UTC](https://forum.bubble.io/t/unloading-bubble-page/144954/9 "2023-05-02T04:36:06Z")

</div>

Hi How did you solve that idea of page unload popup using that line? Can you please explain it in brief?
