You are Online Code used in this page (function () { var displayOnlineStatus = document.getElementById("online-status"), isOnline = function () { displayOnlineStatus.innerHTML = "Online"; displayOnlineStatus.className = "online"; }, isOffline = function () { displayOnlineStatus.innerHTML = "Offline"; displayOnlineStatus.className = "offline"; }; if (window.addEventListener) { /* Works well in Fire