An iframe breaks client events


#1

I’ve noticed that, in general, MiniProfiler doesn’t work very well with iframes.

Our setup is this: we have a page that contains a menu and a nested iframe. This menu updates the URL of the nested iframe.

What I’ve noticed is this:

  1. When first browsing to the page in IE9, the first MiniProfiler results (for the outer page) does not have any client event timings at all (this includes Response, Dom Complete, and Load Event). Then the second set of results (for the nested iFrame) only contains the “Response” and “Dom Complete” client events - it’s missing at least the Load event.

  2. Then when I click on an item in the menu, which just updates the URL of the nested iframe, the MiniProfiler results is missing the “Load” client event.

  3. If I copy the URL of the nested iframe and paste it into a new window, all client events show up as expected.

I’ve also noticed the following, which isn’t necessarily a bug, but which might be related:

  1. When first browsing to the page, the MiniProfiler results for both the outer page and the inner iframe display within the iframe. I would expect the results for the outer page to show up in the outer page and the results for the nested iframe to show up in the iframe.