What is the best way to implement a forced page refresh using Flask?

前端 未结 4 1567
夕颜
夕颜 2021-01-31 18:24

Background
I have a large number of fields that will be updating real time from an external process. I would like to update the Flask hosted pages periodic

4条回答
  •  隐瞒了意图╮
    2021-01-31 19:00

    I think probably the easiest way to do this is using javascript as you already suggest in your question. In this case, Flask would be just delivering an HTML document that contains some javascript code to be executed by the browser, so I don't see why this could cause any problem to Flask. In this page, I've found some examples using different combinations such as using a timer (which seems to be what you're looking for).

提交回复
热议问题