I’m using the jqGrid plugin to jQuery to display the results of database query (submitted via AJAX). Everything works great in Firefox, Chrome and IE9, but there’s weird behavior in IE8. What seems to be happening is that when the AJAX request is initiated, the browser freezes for about 30 seconds — no control on the page can be selected or clicked, and even the browser window cannot be moved.
I’ve just started to debug and found the Fiddler2 tool (new to me) which seems to indicate that the actual AJAX query runs fine, but just after that, Fiddler shows a connection to www.w3.org/TR/html4/loose.dtd with result code 304. When I looked at the timeline for that connection, I see that it took 30 seconds to complete. Why in the world would this happen?
Here’s some more detail in case it’s helpful:
The initial page is reports.php. This page includes the buttons which kick-off the AJAX request.
In Fiddler, I see a connection to /xml/lsql_results_xml.php?[various parameters], and then I see an XML response with the correct data being returned. This all works as I expect.
The next connection on the Fiddler list is a connection back to the original page: /clients/reports.php?[various parameters, including some which seem to have been added by jqGrid]. When I look in Fiddler at what was returned, it appears to be the entire html page generated by reports.php.
The very next connection in Fiddler is the weird one to http://www.w3.org with the 30 second length. This is the one which seems to freeze the browser.
What explains this strange behavior of a 30 second connection to the loose.dtd after the AJAX query? Any suggestions for further debugging? (Obviously, at some point I may need to post a more detailed example of the failing code, but that will require creating a simplified version of this proprietary system, so at the moment, I’m just looking for more general guidance in case I’m missing something really basic.)
Thanks! –Jeff
Turns out that the issue seems to be due to a configuration problem with jqGrid. I’m using jqGrid in a “master/detail” setup and my detail grid is defined without defining a url (because the url will be constructed when a row is selected in the master grid). This doesn’t seem to be a problem in other browsers, but in IE8, it seems to cause IE8 to try to load the .dtd from the DOCTYPE and this causes the whole browser to freeze. Specifying a dummy url for the mastergrid (I just used “http://www.google.com”) resolves the issue. (The actual dummy url doesn’t matter since it is replaced by the actual one when a row is selected in the master grid.