May 15, 2007 | In: archives

Internet Explorer 7, JavaScript, and Array Limits

I came across this a week or so ago while at work. It turns out that there is a limitation on Microsoft's implementation of javascript in IE7, but not one too many people might run into.

It comes in regards to array allocation. Whereas IE6 had no limit on the amount of array elements that could be allocated in memory, IE7 has a limit of about 8000 array elements. I'm not sure of the exact number, but that's usually about the point we were getting our cryptic "syntax error" messages. And to clarify, that's about 8000 total array elements in one page, not just in one array.

The good news is that you can get around this problem by using table objects instead of array objects. While a little more complex to work with in javaScript, they don't have any size limitations and can still get the job done.

Comment Form

Categories