title: How to detect if the user is on a new page if the URI does not change, e.g. on a Single Page Application?
body: <p>I need to be able to detect when the user has visited a new page within the same website. For example, he goes to the index page, and then navigates to the contact page.</p>
  
  <p>I need to do this detection using JS.</p>
  
  <p>Everything is fine if each page has a separate URI, but I'm finding a lot of websites, especially SPAs, don't change the URI when the user navigates about. So everything is <code>/</code>.</p>
  
  <p>My question is this: is there another way to detect when the user has navigated to a different page? For example, is there some window or document value which would tell me it's a unique page?</p>