xdomain-cookies
xdomain-cookies copied to clipboard
location.hash var error
JSON.parse needs a value otherwise it dies and kills the script.
Uncaught SyntaxError: Unexpected end of JSON input at JSON.parse (
) at xdomain_cookie.html:8
Simple solution:
var _hash_data = '';
if(window.location.hash.substr(1)){
_hash_data = JSON.parse(decodeURIComponent(window.location.hash.substr(1)));
}