After using JavaScript to retrieve a list of URL parameters, I now have the following code:
var urlParams = location.search.slice(1);
Someone has recommended that I save these URL parameters in a JSON object within a cookie rather than simply storing the urlParams string. Are there any security or other benefits to storing the URL parameters in a JSON object compared to a string, especially if my only intention is to combine them with a different base URL?