Javascript string size limit: 256 MB for me - is it the same for all browsers?
问题 Curious about what was the maximum string length I could get in Javascript, I tested it myself, today, on my Firefox 43.0.1, running in Windows 7. I was able to construct a string with length 2^28 - 1 , but when I tried to create a string with one more char, Firebug showed me the "allocation size overflow" error, meaning the string must be less than 256 MB. Is this the same thing for all browsers, all computers, all operational systems, or it depends? I created the following snippet to find