Skip to main content

Bug Tracker

Side navigation

#8528 closed bug (invalid)

Opened March 15, 2011 01:56AM UTC

Closed March 15, 2011 04:25AM UTC

Last modified March 14, 2012 07:12PM UTC

IE9 throws "Access denied" when deleting an iframe that had previously made $.ajax calls

Reported by: Owned by: danheberden
Priority: high Milestone: 1.5.2
Component: event Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:


You have a page that includes an iframe. That iframe makes $.ajax calls, and then is removed from the page from the parent. IE9 will throw the following error:

SCRIPT5: Access is denied.

I've debugged this a bit, and it's caused by the window unload event bound by xhrOnUnloadAbort(). When the iframe is removed from the page, the unload event is triggered, but IE9 passes an event object with "Access denied" for nearly every property, and jQuery chokes when it encounters it.

Even though this is an "Access denied" error, it doesn't seem to matter whether the iframe is hosted on another domain or not.

Host page:

<!DOCTYPE html>
    <iframe src=""></iframe>    
    <a href="#">Delete me</a>
    <script type="text/javascript" src=""></script>
    <script type="text/javascript">
    $(function() {
        $('a').click(function() {


Iframe src:

<!DOCTYPE html>
    <script type="text/javascript" src=""></script>
    $(function() {
        $.get('/~ben/disqus/ie9.json', function() {
            $('body').append("ajax call done");
Attachments (0)
Change History (5)

Changed March 15, 2011 02:10AM UTC by danheberden comment:1

component: unfiledajax
keywords: → needsreview
priority: undecidedhigh
status: newopen

Changed March 15, 2011 02:17AM UTC by danheberden comment:2

component: ajaxevent

Changed March 15, 2011 04:21AM UTC by danheberden comment:3

milestone: 1.next1.5.2
owner: → danheberden
status: openassigned

Changed March 15, 2011 04:25AM UTC by danheberden comment:4

resolution: → invalid
status: assignedclosed

no longer present in ie9 final. fwiw, i fixed it :/ but no need now

Changed March 15, 2011 07:20AM UTC by danheberden comment:5

keywords: needsreview