HTML5 <base> tag inside nested iFrames is ignored by IE11

I have a website that is showing a remote document inside an iFrame. This document contains relative paths to its resources, such as images, so the absolute URL is injected by JavaScript as a base tag in the remote header of the document. This works fine 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 great as intended. Now it can happen that my application is loading 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 great in most tested browsers (Chrome, Firefox, ...), but doesn't work in IE11. Image assets from the internal site are now downloaded from myapplication.com (where they do not exist) instead of remote.com/a/b/c. Thus, the internal database tag is ignored in this case.

Does anyone have a solution to this problem?

+3


source share





All Articles