Obtenir l'URL de la page sans paramètres en javascript
window.location.href.split('?')[0];
Yousef Qaoud
window.location.href.split('?')[0];
let urlWithOutParameters = window.location.protocol + "//" + window.location.origin + window.location.pathname;
let urlWithParameters = window.location.href;