Refresh Any

By Wolfy Last update Feb 15, 2006 — Installed 6,841 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 6 posts, 6 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
Sebastien Ce... User

Thanks for this script.

I think it could be a nice idea to refresh only when the server is available (in order to avoid to get an error message if the server is unavailable)

You could achieve this using XHR (XMLHttpRequest)
http://en.wikipedia.org/wiki/XMLHttpRequest

Here is a sample code using XHR


req = new XMLHttpRequest();
req.open('GET', '{$_SERVER['PHP_SELF']}', true);
req.onreadystatechange = function ()
{
if (req.readyState == 4)
{
if(req.status == 200) {
// Page is available
// Reload page
location.href = '{$_SERVER['PHP_SELF']}';
} else {
// Page unavailable
// Do nothing
//alert("page unavailable (status<>200)");
}
} else {
//alert("page unavailable (readyState<>4)");
}
};
req.send(null);

 
Mog User

My Refresh Any now updates waaaaaaaaay too fast/often.

Is there a problem between it, Greasemonkey or MS Windows (Both XP Pro and Vista Ultimate) all legal and updated?

 
phobos User

how can I tell if the script is working?
I don't see any reload of tabs...

help...

 
vincent User

I need something like that that will auto refresh a tab in firefox after x number of seconds but also will alert me if any changes have been made to that tab. Any ideas?? :)

 
Yoda Uk Scriptwright

Nice, I was going to do this one, thought Id check first to see if anyone had put one up..

Thanks! save me the trouble.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel