# Don't reload pages when switching tab in navigation bar

**URL:** <https://forum.inductiveautomation.com/t/dont-reload-pages-when-switching-tab-in-navigation-bar/24784>\
**Category:** Ignition\
**Created:** [May 8, 2019, 8:38am UTC](https://forum.inductiveautomation.com/t/dont-reload-pages-when-switching-tab-in-navigation-bar/24784 "2019-05-08T08:38:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tessa\_luyten](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@tessa\_luyten](https://forum.inductiveautomation.com/u/tessa_luyten)\
**Post date:** [May 8, 2019, 8:38am UTC](https://forum.inductiveautomation.com/t/dont-reload-pages-when-switching-tab-in-navigation-bar/24784/1 "2019-05-08T08:38:47Z")

</div>

Hi all

When I switch between tabs in my navigation window, the **windows** seems to **reload** every time I want to go to another window. So the page is reloading again and it takes again some time to set up. When a client launches a project, I don’t want the different windows to reload every time and want to load them just one time at start up.

Is there a way to do this?  
Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [May 8, 2019, 12:14pm UTC](https://forum.inductiveautomation.com/t/dont-reload-pages-when-switching-tab-in-navigation-bar/24784/2 "2019-05-08T12:14:51Z")

</div>

This is possible as an alternative navigation strategy.

You can use buttons to navigate, or if you use tabs, you must disable the default navigation mode:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/0cc72a4a033dbb898de53002ab03607893b6495f.png)

Afterwards, you can react on a button click or tab switch with a script. For tab strips, you need to react on the `selectedTab` change. When using buttons, every button will have it’s own event.

```auto
if event.propertyName == "selectedTab":
	system.nav.openWindow("whatever/root/path/" + event.source.selectedTab)

```

Please also check the documentation for these functions: [system.nav.openWindow - Ignition User Manual 7.9 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC79/system.nav.openWindow)

- `openWindow` will open a window on top, or bring it to the front if it’s already open
- `openWindowInstance` will always open a new window, even if it already exists (handy for popups, where you may need to see two the same popups of different machines).
- `swap*` will close the current window, and open a new one.

Note that when using the `openWindow*` functions for main page navigation, you lose the standard Ignition functionality of `goBack`, `goForward`, `getCurrentWindow` etc. As Ignition no longer can keep track of what’s currently considered the main window.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 30, 2019, 9:17pm UTC](https://forum.inductiveautomation.com/t/dont-reload-pages-when-switching-tab-in-navigation-bar/24784/3 "2019-12-30T21:17:06Z")

</div>

It’s far better to use swap instead of open for navigation pages. MAke sure that your pages are set to cache:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a1e0566a1ca4edd971ca56adedaec93870123c18.png)
