Cara menambahkan string ke URL saat ini di jQuery | Javascript

var refresh = window.location.protocol + "//" + window.location.host + window.location.pathname + '?arg=1';    
window.history.pushState({ path: refresh }, '', refresh);
Brave Butterfly