Re: [whatwg] same origin iframe relative paths

On 6/1/15 4:49 AM, Aaron Polley (Union Square Software) wrote:
> I've recently been looking at embedding pages with the same origin however in the latest versions of browsers any script tags inside the iframe with relative urls are loaded relative to the parent page url rather than the iframe url.

That sounds quite odd, and doesn't match the behavior of any browser I'm 
aware of.

Do you happen to have a link to a page that shows the behavior you're 
describing?

> Does anyone know what the correct behaviour of the iframe should be in these circumstances?

The correct behavior is that relative URLs in an iframe use the base URL 
of the iframe, which is the document URL of the iframe unless there's a 
<base> tag or the document URL is about:srcdoc or about:blank or 
javascript:something (and possibly some complexity around iframes whose 
content was generated via document.open/write/close).

-Boris

Received on Monday, 1 June 2015 15:19:11 UTC