I am looking to write a piece of javascript that will append a parameter to the current URL and then refresh the page - how can I do this?
Solution:
let url = window.location.href;
if (url.indexOf('?') > -1){
url += '¶m=1'
} else {
url += '?param=1'
}
window.location.href = url;