If I open a new browser window and open a new page in it history.length is 2 in both Chrome and Firefox. Does anyone know why?
Test page: http://jsbin.com/amiyaw
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.
That’s because the new tab, or window, has a default page, which also counts as history. In Chrome’s case, it’s the apps/most visited page.
If you open it from a link, and thus not opening the “new tab” page inbetween, it will output 1.