hashchange
Hashchange is a browser event that fires when the fragment identifier of the current URL changes. The fragment identifier is the portion of the URL that follows a hash symbol (#). This event enables web applications to respond to in-page navigation without triggering a full page reload, supporting lightweight routing and client-side state changes.
The event is triggered when the hash portion changes to a different value. This can occur when
The event object, available to the handler, typically exposes the oldURL and newURL properties, allowing code
Usage commonly involves attaching a listener to the hashchange event, for example using window.addEventListener('hashchange', handler). In
Browser support is broad: the event is supported in modern browsers and has been available since older