I’ve been seeing this on a few websites recently where a link has changed the href of the window.location, but the page does not reload when the link is clicked, and the page remains scrolled down by the amount it was before. Does anyone know how this is done?
I’ve been seeing this on a few websites recently where a link has changed
Share
The sites you’re thinking about probably use the new HTML5 History API, which allows you to change the behaviour of the back buttons and the address bar. Here’s a demo: http://html5demos.com/history
Note that most funny business with hyperlinks will confuse search engines. Make sure your site works acceptably in an ancient browser (Lynx comes to mind) and/or read up on Google’s Ajax Crawling Guidelines.