// Favicon var favicon = document.createElement('link'); favicon.type = 'image/png'; favicon.rel = 'icon'; favicon.href="/"; document.getElementsByTagName('head')[0].appendChild(favicon);