I haven’t the full reason for the problem – exactly which implicit line ending that goes wrong – or whatever else that is broken. But the (almost) fix is – don’t use the minified version. At github you can get either version as (respond.min.js or respond.src.js). Go for the latter, it is the non-minified one.
In my unlatched IE7 I get a somewhat stocastic behaviour. When just browsing it first fails but a reload makes the page load properly.
Other browsers – including Safari/Ipad and built-in/Android seems to work alright with the minified version.
Out of date web browser. Out of date script engine. Limping solution.
To fire up the debugger, enter
as javasctipt on a row exceuting before where you want to start debugging. One could probably divide by zero or something that makes IE throw up a dialogue asking if you want to debug or not. and then answer yes…
There doesn’t seem to be any good official debugger for IE7, unless you have Visual studio installed. Search the web and there is a NT4-compatible Microsoft Script Debugger; it is not very good. There is one or more solutions but this is the only I have tried.
If you get a dialogue/error message
Request format is invalid: application/json; charset=utf-8
when working with jquery and ajax on an iis / dotnet solution, it might be due to missing lines in web.config. The code below is for Dotnet3.5. I don’t know what it looks like in 2.0 or 4.0.
<remove path=”*.asmx” verb=”*” />
<add path=”*.asmx” type=”System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=22.214.171.124, Culture=neutral, PublicKeyToken=31BF3856AD364E35″ validate=”false” verb=”*” />
<add path=”*_AppService.axd” type=”System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31BF3856AD364E35″ validate=”false” verb=”*” />
<add path=”ScriptResource.axd” type=”System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=188.8.131.52, Culture=neutral, PublicKeyToken=31BF3856AD364E35″ validate=”false” verb=”GET,HEAD” />
Just a tip up front. IE7 runs an older script engine than IE8 and has no full support for Json.
So your code that calls JSON.stringify does not work.
The remedy is to include json2.js from https://github.com/douglascrockford/JSON-js/blob/master/json2.js. It does not interfere with IE8+. Just download the file (the “raw” button – saveas) to your script lib and include as so:
Running IE9 in compatibility mode does not make this error appear – it seems like IE9-in-IE7-mode is running a newer script engine.
That impediment avoided you are free to continue adding value to your site.