diff --git a/index.html b/index.html index fbea989..02b2dde 100644 --- a/index.html +++ b/index.html @@ -75,7 +75,8 @@ View the server map

- Map is updated every day around 3 am EST. + Map is updated every day around 3 am EST. Last updated:  +

Server Log

@@ -90,9 +91,10 @@

Updated every 10 seconds.

- + + diff --git a/js/getMapUpdate.js b/js/getMapUpdate.js new file mode 100644 index 0000000..f5fe635 --- /dev/null +++ b/js/getMapUpdate.js @@ -0,0 +1,10 @@ +var mapUpdateTime = document.getElementById('map-last-updated'); + +function getHeaderTime () { + mapUpdateTime.textContent = moment(this.getResponseHeader("Last-Modified")).calendar(); +} + +var oReq = new XMLHttpRequest(); +oReq.open("HEAD", "/map/index.html"); +oReq.onload = getHeaderTime; +oReq.send();