javascript detect page code example Example: javascript detect page if ( document.URL.includes("homepage.aspx") ) { //Code here }