Demo

Open your browser's developer tools and watch the console to see what code is running. I.e. global scope, popstate, or pushState.

Also check out the actual JavaScript for the full details.