I recently ran into this problem and came up with the following solution. If you try to assign the URL as follows:
document.location.href = theUrlWithTheCustomProtocol;
you will encounter this limit error of 508 characters, and in IE8 you will receive a JavaScript error saying that "the data area passed to the system call is too small."
To get around this problem, I switched from the above code to using jQuery to create a hidden iframe like this:
// Remove old frame $('#hiddenIFrame').remove(); // Add new one $('<iframe />', { 'id': 'hiddenIFrame', 'name': 'hiddenIFrame', 'src': theUrlWithTheCustomProtocol, 'style': 'display: none;' }).appendTo("body");
This wraps around the character limit of IE 508 using document.location.href, and this solution works for IE, FireFox, Chrome, and Safari.
source share