TwelvestoneFront End

jquery 1.5 javascript stack space quota too small


Sign in

  • Waiting for Godot ( 730 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 5.1 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.9 k posts )
    general front end design an...
  • Back End ( 9.7 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
persist
 
2011-02-09

Just as an FYI.

We were loading a very large json result using jquery 1.5's .ajax method. But because of jquery's native json parse, we were hitting a recursion limit. On jquery 1.4 and below, this was not causing an issue.

However, 1.5 dies in FF 3. This is a known defect, although Mozilla claims it's been fixed in release. It is not. There is some discussion over at ubuntu where they decide it's not their defect:https://bugs.launchpad.net/ubuntu/+source/firefox-3.0/+bug/299714

Here's where moz claims it's fixed:https://bugzilla.mozilla.org/show_bug.cgi?id=420869

To get around this you can include json2.js from json.org. Load your json using $.ajax() with the type modifier "text" so that it doesn't attempt to auto parse as json. Then store the result as raw text in a js var. You can then run the raw through json2 without a stack overflow on the page, even on very large data sets or absurd nesting.

Obviously the right fix is to not send so much data with so many nestings to jquery, but it fixed a defect quick while we redesign the approach.

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFront End

jquery 1.5 javascript stack space quota too small