0

I'm coming across an odd issue when loading asp.net pages with IE9.

Basically, I'm working with a legacy system that is getting slowly updated and has some odd coding. The specific page loads, then has an iframe load a different page, basically a year 2000 version of async loading.

The problem is, that when the iframe page is loading (it needs to generate data so it may not return for close to half a minute or more), IE9 will not load any new pages from the current domain until the iframe page loads. So if a user visits this page and then decides they want to visit a different page instead, they have to wait for the iframe to finish loading before they can browse to a different page. Clicking the stop button first does nothing, the page still persists until the iframe loads.

This is a corporate web application so only IE is supported, but this problems does not appear to happen in Chrome (The page is badly broken otherwise, but the loading delay problem doesn't exist)

Any thoughts?

Edit: I should add that Response.IsClientConnected always returns true unless the tab or browser is closed.

Josh Mackey
  • 233
  • 2
  • 10

2 Answers2

0

Try to execute the next when one of the elements that navigate away from your page are clicked

window.frames[0].document.execCommand('Stop');

If you have more than 1 frame adjust the number of the frame

peter
  • 41,770
  • 5
  • 64
  • 108
  • That does nothing unfortunately. – Josh Mackey Jun 05 '12 at 21:54
  • If I execute "execCommand('Stop')" on the iframe, it does indeed abort the connection but IE9 still waits until when it WOULD have returned to navigate away. So something is still blocking. – Josh Mackey Jun 06 '12 at 17:35
  • and if you first stop and then let the iframe go to a different location like "about:blank" ? – peter Jun 06 '12 at 19:21
  • The iframe aborts and navigates to "about:blank" just fine, but IE9 still blocks until the page would have returned. – Josh Mackey Jun 08 '12 at 17:23
  • perhaps a modal iframe see http://stackoverflow.com/questions/512257/jquery-modal-boxes-and-iframe – peter Jun 08 '12 at 17:40
0

I found the solution.

It turns out that IIS keeps the session for a user thread-safe, so only one page can access it at a time. When the page inside the iframe was processing, it locked the Session thus making any other pages wait until it finished, hence the delay.

Josh Mackey
  • 233
  • 2
  • 10