I am getting RangeError during serialization of Navigator object.
What could be the reason?
JSON.stringify(navigator);
RangeError: Maximum call stack size exceeded
Browser: Chrome
That's because, as the error message says, the navigator
object is too big.
You can use dystroy's modified JSON function like this:
var navJSON = JSON.pruned(navigator);
The object returned is pretty huge, but it's almost certain that it isn't completely correct. If you want to transfer data about the navigator
object using JSON, you should send those properties only, not the entire object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With