# Implicit Instances and WebPages

**URL:** <https://forum.xojo.com/t/implicit-instances-and-webpages/35500>\
**Category:** Web\
**Created:** [January 13, 2017, 5:40pm UTC](https://forum.xojo.com/t/implicit-instances-and-webpages/35500 "2017-01-13T17:40:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ralph\_Alvy](https://forum.xojo.com/user_avatar/forum.xojo.com/ralph_alvy/32/4528_2.png) [@Ralph\_Alvy](https://forum.xojo.com/u/Ralph_Alvy)\
**Post date:** [January 13, 2017, 5:40pm UTC](https://forum.xojo.com/t/implicit-instances-and-webpages/35500/1 "2017-01-13T17:40:50Z")

</div>

I seem to remember Greg O’Lone saying on this forum somewhere that all implicit instances of WebPages are loaded into memory when the app starts, not just when they’re called. Is this correct?

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [January 13, 2017, 6:08pm UTC](https://forum.xojo.com/t/implicit-instances-and-webpages/35500/2 "2017-01-13T18:08:59Z")

</div>

Yes. You can see every implicit instance page by looking at the DOM.

---

<div class="post-metadata">

**Author:** ![Ralph\_Alvy](https://forum.xojo.com/user_avatar/forum.xojo.com/ralph_alvy/32/4528_2.png) [@Ralph\_Alvy](https://forum.xojo.com/u/Ralph_Alvy)\
**Post date:** [January 13, 2017, 6:51pm UTC](https://forum.xojo.com/t/implicit-instances-and-webpages/35500/3 "2017-01-13T18:51:05Z")

</div>

Thanks, Tim. Can excessive WebPage implicit instances affect traffic to and from the browser? Somehow I would think this is only dependent on what is Shown. I’m trying to see if implicit instances of WebPages affects this statement from a fellow developer:

> [@](#):
>
> For every Xojo web control you have it fires a Shown event that sends a request to the backend web server. So just loading a few controls on a single page every visit could be dozens of requests. As you interact it, it generates dozens more. If you have multiple pages, containers, controls, etc. then the number of raw HTTP requests for each user could be hundreds.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [January 13, 2017, 7:01pm UTC](https://forum.xojo.com/t/implicit-instances-and-webpages/35500/4 "2017-01-13T19:01:28Z")

</div>

From the quote it doesn’t sound like it would cause any more traffic than non-implicit, but I don’t know the web internals that well. @Greg O’Lone would have to comment.

However, having them all available but hidden in the browser is much less secure if you’re doing something where you need to control what the user has access to. For example, a login-secured app, or a secured downloads page. Basically, if the page it’s in the browser, the user _can_ make the page visible themselves.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [January 13, 2017, 7:20pm UTC](https://forum.xojo.com/t/implicit-instances-and-webpages/35500/5 "2017-01-13T19:20:50Z")

</div>

Indeed for apps that require security it is way better to switch off implicit instance and instantiate the webpages only when needed. Also, make sure to close the webpages after displaying a new one, otherwise it stays around as well.

---

<div class="post-metadata">

**Author:** ![Bob\_Keeney](https://forum.xojo.com/letter_avatar_proxy/v4/letter/b/54ee81/32.png) [@Bob\_Keeney](https://forum.xojo.com/u/Bob_Keeney)\
**Post date:** [January 13, 2017, 7:55pm UTC](https://forum.xojo.com/t/implicit-instances-and-webpages/35500/6 "2017-01-13T19:55:10Z")

</div>

Implicit Instances, in my opinion, are evil. Convenient, but still evil. They can lead to some very hard to find bugs. I wrote about this a year ago at [http://www.bkeeneybriefs.com/2016/01/implicitinstance-is-evil/](http://www.bkeeneybriefs.com/2016/01/implicitinstance-is-evil/). I generally turn off implicit instance on my web pages and windows.

The article is mainly about Windows in desktop, but I believe that most of my reasoning is still valid for web.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [January 13, 2017, 9:12pm UTC](https://forum.xojo.com/t/implicit-instances-and-webpages/35500/7 "2017-01-13T21:12:58Z")

</div>

Except that WebPage implicit instance does not work quite the same. Calling a property or control in another Webpage that is not displayed does not instantiate it the same way as windows.

Yet, I agree with you : to have full control on WebPages as well as Windows, it is much better to switch off implicit instantiation.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 6:36pm UTC](https://forum.xojo.com/t/implicit-instances-and-webpages/35500/8 "2020-10-29T18:36:51Z")

</div>


