if (window.performance) { console.info("window.performance is supported"); console.log(performance.navigation.type) }