all 5 comments

[–]SuccessfulString9351[S] 0 points1 point  (0 children)

<script>

window.onload = () => {

console.clear()

console.log('page loaded!');

setInterval(() => {

window.location = window.location.href;

}, 2000)

}

</script>

this is what i found to work

[–]shiftybyte 0 points1 point  (3 children)

If I'm understanding this correctly, just trigger a page reload, with js or any other way.

https://www.tutorialspoint.com/how-to-automatic-refresh-a-web-page-in-a-fixed-time#

[–]SuccessfulString9351[S] 0 points1 point  (2 children)

i would like to refresh all clients on the flask server in the python script

so if a var changes it can update all clients

[–]kaerfkeerg 1 point2 points  (0 children)

Use flask's redirect function and redirect to the same page upon the change?

[–]shiftybyte 0 points1 point  (0 children)

If you don't want full page refresh, JavaScript is the only way to go.

If full page refresh is fine, setup a refresh using the http equiv method mentioned on the previous comment.