Bug Tracker

Ticket #3019 (new bug)

Opened 3 months ago

Using AJAX type=script or type=jsonp on IE6 sometimes breaks

Reported by: bgoldman Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.3 Component: ajax
Version: 1.2.6 Keywords:
Cc: Needs: Review

Description

On IE6, I noticed that one of my AJAX requests was failing. The AJAX request was using type=jsonp. After doing a very thorough round of testing and trying to narrow down the bug, I came to the conclusion that when using type=script or type=jsonp, IE6 fails if also the page making the AJAX request is inside an iframe, and also if Cache-control is set to no-store, and also only if the url being called is on a different domain. It's a very obscure IE6 bug. I found that a solution to this bug was modifying jQuery to use document.body.appendChild(script) instead of head.appendChild(script). I think a good fix in jQuery would be to just append to document.body instead of head. So instead of creating a head variable which is used to append for cross-domain script/jsonp, just make a generic script_parent or something. I am attaching a zip of some files to reproduce the bug. Try accessing index.php in Firefox and IE6 and notice an alert both times. However, try accessing bug.html in Firefox and IE6 and notice the bug. The bug also only appears about 50% of the time, not even always, in IE6. Like I said, it's obscure :)

Attachments

jquery-bug-ie6.zip (31.6 kB) - added by bgoldman 3 months ago.

Change History

Changed 3 months ago by bgoldman

Note: See TracTickets for help on using tickets.