I Hate Safari, part 2

Posted on January 8th, 2009 by Arthur Kay

I posted yesterday about my frustrations with the Safari JS debugger.

As it turns out… that isn’t the only problem I have with JavaScript in Safari.

Some background: I’m currently working with 2 .NET developers on a project, and we’re using the MVC framework. For the UI, I’ve been using ExtJS to build an AJAX-driven environment.

To build the UI, we have a series of .aspx pages (returned as “Views” in MVC) in which I’m using SCRIPT tags to launch the JavaScript code. Some of the JS code is written within these SCRIPT blocks, and other JS code is included in external .js files.

The problem I’m seeing is that Safari, for some unknown reason, won’t process the JavaScript code within the SCRIPT blocks if there is “too much” JavaScript code.

I’ve tested this by copy/pasting my JS code into an external file, and simply calling the function from the SCRIPT tag using 1 line of code. I have 900 lines of code in my .js file.

I didn’t change any of the code; but moving it into an external file works. Clearly, since the call to my function works just fine in the SCRIPT tag, there must be a limit as to how much JS code can be executed from within my MVC view.

There are two questions I have at this point: (1) how much is too much JS code?, and (2) Why does Safari have this issue?

Has anyone ever seen this?

Share and Enjoy:
  • RSS
  • Facebook
  • StumbleUpon
  • Digg
  • Sphinn
  • del.icio.us
  • Technorati
  • Reddit
  • LinkedIn
  • Twitter
  • Yahoo! Buzz

Leave a Reply