Swapped http refresh to ajax

This commit is contained in:
Benjamyn Love committed 2019-03-18 23:37:55 +11:00
1 parent 92b71b8d87
commit e2563ea5a8
3 files changed
+16 -2

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
var domain = "test.benjamyn-testing.com"
function loadContent() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.body.innerHTML = this.responseText
}
};
xhttp.open("GET", domain, true);
xhttp.send();
}
setInterval(loadContent, 60000)