2

I was hoping to know if there are different ways of refreshing a website 'www.mywebsite.com'

Midori is the most favoured as you can do the following from the terminal:

midori -a http://www.mywebsite.com/ -i 120 -e Fullscreen

This will open midori to open www.mywebsite.com and refresh at every 120 seconds (= 2 minutes).

There is also the option of writing a bash script, in which the code 'simulates' as if the F5 (aka refresh key) is being pressed :

#!/bin/bash

DISPLAY=:0 xdotool search --name ci-monitor windowactivate --sync key F5 >> ~/log/tmp.log 2>&1

and calling it from the crontab. The frequency can be altered/set via the crontab.

Q: Is there any other way of auto refreshing at set intervals?

  • Have you looked at luakit? You can fully script this browser - I use it for kids' programming classes to avoid them going to all sorts of unwanted webpages, but I'm sure you could script it to do autorefresh .. plus it runs a lot faster than midori. – Phil B. May 19 '15 at 2:18
3

How about in the code of your website?

If you put the following in the HEAD section of your page, it will auto-refresh every three seconds:

<meta http-equiv="refresh" content="3" >

There are other methods available to accomplish the same thing, ranging from JavaScript and other client-side applications to server-side code.

Can you be more specific as to what you are attempting to accomplish? Also, I am not sure this question belongs in this area any more if we get into browser refreshing...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.