I need to see if the current page a user is on is the main page of the website, i.e. there is nothing after the base url.
I’m doing this to exclude some code off the main page.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Read more on the (cross-browser)
window.locationobject.Edit: If your ‘root’ maybe served by some file named
index(e.g.index.html,index.php,index.asp, etc.) you may want:or more explicitly: