# Auto Refresh a Section

**URL:** <https://forums.pega.com/t/auto-refresh-a-section/1056>\
**Category:** User Experience\
**Tags:** financial-services, 8-3-3, user-experience, system-architect\
**Created:** [January 19, 2021, 2:22pm UTC](https://forums.pega.com/t/auto-refresh-a-section/1056 "2021-01-19T14:22:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KarthikGangisetty](https://avatars.discourse-cdn.com/v4/letter/k/ec9cab/32.png) [@KarthikGangisetty](https://forums.pega.com/u/KarthikGangisetty)\
**Post date:** [January 19, 2021, 2:22pm UTC](https://forums.pega.com/t/auto-refresh-a-section/1056/1 "2021-01-19T14:22:56Z")

</div>

Hi,

I have a section A which contains Section B. As Per business requirement I have to Auto refresh(without any user action) only section B for every 30 mins.

I have written below code in a non generated html and included it in Section B - But the issue is its refreshing the whole harness.

Please let me know any way to resolve this.

\>

Thanks in advance,

---

<div class="post-metadata">

**Author:** ![KarthikGangisetty](https://avatars.discourse-cdn.com/v4/letter/k/ec9cab/32.png) [@KarthikGangisetty](https://forums.pega.com/u/KarthikGangisetty)\
**Post date:** [February 2, 2021, 5:49am UTC](https://forums.pega.com/t/auto-refresh-a-section/1056/2 "2021-02-02T05:49:30Z")

</div>

@KarthikGangisetty

Any Thoughts/Suggestions?

---

<div class="post-metadata">

**Author:** ![TashikaS](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/tashikas/32/8412_2.png) [@TashikaS](https://forums.pega.com/u/TashikaS)\
**Post date:** [February 2, 2021, 11:38am UTC](https://forums.pega.com/t/auto-refresh-a-section/1056/3 "2021-02-02T11:38:25Z")

</div>

@KarthikGangisetty

You can leverage the advantage of OOTB exposed API “pega.u.d.refreshSection”.

Create a non-autogenrated section. Include javascript with setTimeout function and use Pega.u.d.refreshSection to called with certain interval time.

```auto
<script>

var id = window.setInterval(autorefreshMySection, 3000); //3 seconds

function autorefreshMySection()

{

pega.u.d.reloadSection(pega.u.d.getSectionByName("MySection","",""),"",'', false, true, '-1', false);

}

</script>

</head><body>

<pega:include name="MySection" type="Rule-HTML-Section"/>

</body>

</html>

```

Regards,

Tashika
