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($)
To clear out all the parameters, without doing a page refresh, AND if you are using HTML5, then you can do this:
history.pushState({}, '', 'index.html' ); //replace 'index.html' with whatever your page name is
This will add an entry in the browser history. You could also consider replaceState
if you don't wan't to add a new entry and just want to replace the old entry.