# Refresh page button

**URL:** https://discourse.nodered.org/t/refresh-page-button/33726
**Category:** Dashboard
**Created:** [4 October 2020 11:48 UTC](https://discourse.nodered.org/t/refresh-page-button/33726 "2020-10-04T11:48:20Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jamhough22](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@jamhough22](https://discourse.nodered.org/u/jamhough22)
#### Post date: [4 October 2020 11:48 UTC](https://discourse.nodered.org/t/refresh-page-button/33726/1 "2020-10-04T11:48:20Z")

</div>

I need to refresh the page or current tab but the help section of the 'ui control' node is not too helpful.  
i think i understand the idea of 'Sending a blank tab name "" will refresh the current page'  
but im strugeling to refresh the current page.  
by using a simple button, i can send to another page with just sending the page number e.g ' 2 ' as a string type payload, but cant seem to refresh the page/current tab.  
Im not sure where im going wrong.

A bit of context - I have a camera on this one page that works ok on a desktop web browser and shows the image when changing tabs but not on a iphone with node red dashboard linked directly on the home screen (i.e no browser as such it looks like an app) every time i change the tab the image disapears and i need to close it and reopen the "app" to see the image again. A simple button to refresh will sufice.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [4 October 2020 13:25 UTC](https://discourse.nodered.org/t/refresh-page-button/33726/2 "2020-10-04T13:25:01Z")

</div>

Hi, I assume you are referring to a Dashboard page? You might like to change the category to Dashboard in that case.

You should also note that Dashboard is a single page, not multiples. The tabs are a "cheat" to make it look like multiple pages but they aren't really. So if you reload the "page", you will reset everything on all tabs.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [4 October 2020 13:41 UTC](https://discourse.nodered.org/t/refresh-page-button/33726/3 "2020-10-04T13:41:52Z")

</div>

Perhaps what you need to do is to re-inject the image html each time the tab changes (using ui\_control to trigger it).

---

<div class="post-metadata">

### Author: ![jamhough22](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@jamhough22](https://discourse.nodered.org/u/jamhough22)
#### Post date: [4 October 2020 14:13 UTC](https://discourse.nodered.org/t/refresh-page-button/33726/4 "2020-10-04T14:13:38Z")

</div>

I have changed the category to dashboard.  
I didnt know the dashboard is a single page, still refreshing the whole dashboard will still work fine. as closing and re opening the "app" is essentially the same thing.

any ideas on how to accomplish this?

---

<div class="post-metadata">

### Author: ![jamhough22](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@jamhough22](https://discourse.nodered.org/u/jamhough22)
#### Post date: [4 October 2020 14:14 UTC](https://discourse.nodered.org/t/refresh-page-button/33726/5 "2020-10-04T14:14:54Z")

</div>

This could also work but sounds a bit more complicated than a simple refresh. just a full refresh of the dashboard is all i really need.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [4 October 2020 14:46 UTC](https://discourse.nodered.org/t/refresh-page-button/33726/6 "2020-10-04T14:46:13Z")

</div>

You probably want this in a custom button (ui\_template):

> **[Location: reload()](https://developer.mozilla.org/en-US/docs/Web/API/Location/reload)**
>
> The Location.reload() method reloads the current URL, like the Refresh button.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [3 December 2020 14:46 UTC](https://discourse.nodered.org/t/refresh-page-button/33726/7 "2020-12-03T14:46:13Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
