views:

20

answers:

1

I have one web page with an iframe. The iframe is on a different subdomain to the outerpage. The iframe page references style sheets (in the form of webresource.axd files) that have relative paths.

The problem is, Internet Explorer (6, 7 and 8) appears to be turning these relative paths into complete URLs but with the wrong subdomain. It uses the parent pages and not the iframe. This does not happen with firefox (3).


To illustrate...

http://outer.test.com/index.aspx

...containes an iframe with the following page:

http://inner.test.com/iframe.aspx

The iframe page contains the line:

<link href="/WebResource.axd?d=xxx;t=123" type="text/css" rel="stylesheet" />

When the page is loaded in IE and traced through fiddler the requested url is:

http://outer.test.com/WebResource.axd?d=xxx;t=123


I have investigated various ways to mitigate this so that we use full paths but I would really like to know why this happens.

+2  A: 

Known issue or "feature" with IE that only affects stylesheets inside an iframe: http://support.microsoft.com/kb/937266

Aaron D
I guess that's it then. Thanks
Chris Simpson