I am trying to optimize loading times of my web application. So, instead of making a new instance of a page, reuse an existing one if available (memory is not an issue but latency is).
I know there are the Session.PageXXX properties. Does that mean that as long as I do not explicitly close a page but just navigate to another one - there’s still a reference kept to it?
Yes. Keep in mind that every page uses memory and using a single page where you swap in new content really doesn’t save you a whole lot of time. As of r2, all data sent to a browser that can handle compressed content is compressed, and the code necessary to instantiate a new page is probably under 5K. That said, sending all of the commands to remove the previous contents and then all the commands to add the new content will probably have a higher overhead if most of the content changes. When designing your pages, just be aware that here will be a tipping point as to whether you should reuse the current page or create a new one.