bagaimana mendeteksi perubahan url

window.addEventListener('popstate', function (event) {
	// The URL changed...
});
Modern Mockingbird