I am trying to remove everything after the \"?\" in the browser url on document ready.
Here is what I am trying:
jQuery(document).ready(function($)
a single line solution :
history.replaceState && history.replaceState( null, '', location.pathname + location.search.replace(/[\?&]my_parameter=[^&]+/, '').replace(/^&/, '?') );
credits : https://gist.github.com/simonw/9445b8c24ddfcbb856ec