Hello there!
I am right now looking for a plugin, which automatically refreshes the page when something changes, as I am using an external program to modify my files. Any ideas?
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Plugins
You don't need a plugin for that, just use straight JS:
JS
function get_page(url)
{
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET", url, false);
xmlhttp.send();
return xmlhttp.responseText;
}
var html = get_page(window.location.href);
setInterval(function(){
if(html != get_page(window.location.href)){
location.reload();
}
}, 5000);
The code above will check for changes every 5 seconds and reload if it detects any.
last edited 03/28/18 by P. Fighter
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 2 | 47 | 1 week ago | ||
| 2 | 56 | 4 weeks ago | ||
| 3 | 1183 | 1 month ago | ||
| 1 | 50 | 1 month ago | ||
| 3 | 74 | 2 months ago |