I have a website which shows a remote document inside an iFrame. That document contains relative paths to its resources like images, so the absolute url is injected by JavaScript as base-tag into the remote document's head. This works perfectly and looks like this:
<html>
<head><title>My application</title></head>
<body>
<h1>Take a look at this document:</h1>
<iframe src="http://www.remote.com/a/b/c/">
<html>
<head>
<base href="http://www.remote.com/a/b/c/"</base>
</head>
...
</html>
</iframe>
</body>
</html>
This works perfectly as intended. Now it may happen that my application itself is loaded into an iframe like this:
<html>
<head>...</head>
<body>
<h2>Take a look at that application:</h2>
<iframe src="http://myapplication.com"></iframe>
</body>
</html>
where the URL http://myapplication.com loads exactly the above code into the iframe.
This also works perfectly in most tested browsers (Chrome, Firefox, ...), but is doesn't work in IE11. The image resources from the inner site are now loaded from myapplication.com (where they don't exist) instead of remote.com/a/b/c. So the inner document's base-tag is ignored in this case.
Does anybody have a solution for this problem?