# onUnload in webclient

**URL:** <https://forum.servoy.com/t/onunload-in-webclient/12104>\
**Category:** Classic Servoy\
**Created:** [April 26, 2010, 12:33pm UTC](https://forum.servoy.com/t/onunload-in-webclient/12104 "2010-04-26T12:33:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![michel](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@michel](https://forum.servoy.com/u/michel)\
**Post date:** [April 26, 2010, 12:33pm UTC](https://forum.servoy.com/t/onunload-in-webclient/12104/1 "2010-04-26T12:33:16Z")

</div>

When logging off from application we send the user back to the login-screen with:

```auto
security.logout('main')

```

in smart-client the onUnload-method of all the forms is triggered after this, in webclient the onUnload method is not called. Is this a bug or is this expected behavior? Calling the method history.clear() also does not seem to trigger the onUnload.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [April 28, 2010, 2:49pm UTC](https://forum.servoy.com/t/onunload-in-webclient/12104/2 "2010-04-28T14:49:45Z")

</div>

is must authenticate true for that solution?

---

<div class="post-metadata">

**Author:** ![michel](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@michel](https://forum.servoy.com/u/michel)\
**Post date:** [April 28, 2010, 3:07pm UTC](https://forum.servoy.com/t/onunload-in-webclient/12104/3 "2010-04-28T15:07:14Z")

</div>

Yes mustAuthenticate is checked in the solution.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [April 29, 2010, 7:16am UTC](https://forum.servoy.com/t/onunload-in-webclient/12104/4 "2010-04-29T07:16:56Z")

</div>

then i don’t see any difference. The solution should just be unloaded and because of that the forms should be destroyed which does result in an unload event.  
If that is not the case make a case

---

<div class="post-metadata">

**Author:** ![michel](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@michel](https://forum.servoy.com/u/michel)\
**Post date:** [April 29, 2010, 10:12am UTC](https://forum.servoy.com/t/onunload-in-webclient/12104/5 "2010-04-29T10:12:25Z")

</div>

Case created (288612)
