How can I check if a URL has changed in JavaScript? For example, websites like GitHub, which use AJAX, will append page information after a # symbol to create a unique URL w
In modern browsers (IE8+, FF3.6+, Chrome), you can just listen to the hashchange event on window.
hashchange
window
In some old browsers, you need a timer that continually checks location.hash. If you're using jQuery, there is a plugin that does exactly that.
location.hash