JSON crashing Safari
I have an app that has made use of Ajax since the start and recently decided to try to get it working with Safari, since most of our users are on Macs. It didn’t work at all with its previous incarnation and I thought about using the Yahoo UI library, which works pretty well in Safari. Everything started out fine, but when I added in the data portion back in, Safari started crashing.
At first I wasn’t sure what it was, the JSON data, or something with the page itself. The JSON data could get fairly large so I was able to trim that down to just the bare minimum and that allowed Safari (2.0.4) to work some of the time, but it would still occasionally crash. About the only thing I can dig up is that Safari doesn’t like page replacement via innerHTML, which naturally just about every Ajax library uses. In my case I’m using Prototype to make the actual ajax calls and put the results where they belong.
This really sucks as it works great with IE and Firefox, just not Safari. I may have to go to a non-ajax mechanism such as iframes, but that would really take some rework.
Anybody have a suggestion or two?
Don’t miss anything, subscribe!
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

Comments
No comments yet.
Leave a comment