menyembunyikan parameter di url
function hideUrlParameters() {
// Check if the URL has a query string
if (window.location.search.length > 0) {
// Use replaceState to change the URL in the address bar
// The first argument is the state object, the second is the title (ignored by most browsers),
// and the third is the new URL.
const clean_uri = window.location.pathname;
window.history.replaceState(null, document.title, clean_uri);
}
}
// Call the function when the page loads
window.addEventListener("load", hideUrlParameters);
Komentar
Posting Komentar