3 ms·
The UX is not that interesting to me. Does anyone know how the page avoids a refresh while changing the location url? it changes the path, and not just a hash
by jdavid 16y ago
The UX is not that interesting to me.
Does anyone know how the page avoids a refresh while changing the location url? it changes the path, and not just a hash. i thought all path changes demanded a page refresh.
- miGlanz 16y agoNope, it doesn't change path. Path changes are after the hash. Although when you hover over the arrow pointing to the next page it shows different path, it's probably for browsers with JavaScript disabled. Clicking this link is also intercepted by JavaScript. EDIT: sorry, it actually does change the path on Chrome. It doesn't on Firefox.
- tedkimble 16y agoIt's using the window.history.pushState() and window.history.replaceState() javascript methods. Here's some Mozilla documentation: https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history https://developer.mozilla.org/en/DOM/Manipulating_the_browse...