# HTML page refreshing too fast for database to update

**URL:** <https://discourse.nodered.org/t/html-page-refreshing-too-fast-for-database-to-update/64655>\
**Category:** General\
**Tags:** http-request\
**Created:** [4 July 2022 00:06 UTC](https://discourse.nodered.org/t/html-page-refreshing-too-fast-for-database-to-update/64655 "2022-07-04T00:06:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![papershow](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@papershow](https://discourse.nodered.org/u/papershow)\
**Post date:** [4 July 2022 00:06 UTC](https://discourse.nodered.org/t/html-page-refreshing-too-fast-for-database-to-update/64655/1 "2022-07-04T00:06:41Z")

</div>

Hi,

[https://youtu.be/T6lf39TYjAY?t=2197](https://youtu.be/T6lf39TYjAY?t=2197)

I am following this tutorial as a baseline to learn HTML to start a new project. I'm at the linked timestamp, where data is being added to a table, but every time I click a button the page refreshes but the changed content does not update as opposed to the video (until after a manual refresh). Is there any way to make sure that the content updates before the page loads?

Node-Red v2.2.2  
Node.js v18.4.0

Thanks!

---

<div class="post-metadata">

**Author:** ![OriolFM](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oriolfm/32/30710_2.png) [@OriolFM](https://discourse.nodered.org/u/OriolFM)\
**Post date:** [5 July 2022 06:28 UTC](https://discourse.nodered.org/t/html-page-refreshing-too-fast-for-database-to-update/64655/2 "2022-07-05T06:28:49Z")

</div>

In your flow, just update the DB first, and when you get the reply from the DB saying that it has entered the data (and only then), you update the UI.

Out of curiosity, how fast are you getting new data? What's the update frequency?

---

<div class="post-metadata">

**Author:** ![papershow](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@papershow](https://discourse.nodered.org/u/papershow)\
**Post date:** [15 July 2022 19:31 UTC](https://discourse.nodered.org/t/html-page-refreshing-too-fast-for-database-to-update/64655/3 "2022-07-15T19:31:12Z")

</div>

Turns out I was being an idiot and not running the http in back to the http response to refresh the page with the new data. Thanks for the help!

---

<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:** [29 July 2022 19:31 UTC](https://discourse.nodered.org/t/html-page-refreshing-too-fast-for-database-to-update/64655/4 "2022-07-29T19:31:47Z")

</div>

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