'How to Refresh the Google WebApp on every update?

I'm getting the data from Google sheets and displaying it on Google WebApp front end. But The problem is, the Google WebApp front end don't update itself unless the window is refreshed.

Is there a way to refresh itself when it detects a data change in Google sheets or refreshes itself every 15 minutes.

index.html

<script>
function onSuccess(UpdatedData) {
var div = document.getElementById('output');

div.innerHTML = '<div class="badge bg-primary text-wrap fw-normal" style="width: 6rem; ">Last Updated:</div> <span class="font-weight-normal text-muted fs-6">'+ UpdatedData + '</span>';
}

google.script.run.withSuccessHandler(onSuccess).getdata();
</script>

<body>
<div id="output"></div>
</body>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source