Say I want to run a simple Python script that is a web server. And I want to connect a browser to it that refreshes every N seconds, i.e. so the page is updated. How would I do that?
I assume the Python server script would generate some HTML that contains javascript that sleeps and forces a refresh? Or can the browser force a refresh?
Thanks in advance.
Yes, you can set a tab to auto refresh in the browser with a custom-defined frequency. But, browsers don't come with a built-in option for it. Users generally rely on third-party apps or extensions to auto refresh a tab or particular website in their browser.
For auto-refreshing pages, you also have an extension available that you can easily add to the browser and save yourself from hitting that F5 key again and again. Launch Chrome and head over to the Super Auto Refresh Plus extension page. Click on the Add to Chrome button to add it to your browser.
<meta http-equiv="refresh" content="5" />
That would reload the page after 5 seconds.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With