Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get a web browser to refresh automatically?

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.

like image 200
Nick Avatar asked Apr 02 '09 10:04

Nick


People also ask

Can you set a browser to auto refresh?

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.

How do I make my website constantly refresh?

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.


1 Answers

<meta http-equiv="refresh" content="5" />

That would reload the page after 5 seconds.

like image 195
Martin Clarke Avatar answered Nov 15 '22 00:11

Martin Clarke