Re: [whatwg] same origin iframe relative paths

Thanks for your reply, I was unable to find reference for the behaviour of relative urls within Iframes in the specs.

Would you happen to know where I could find this in the specs?

We're working on getting an isolated reproduction that I can send you a link to.

Aaron

-----Original Message-----
From: whatwg [mailto:whatwg-bounces@lists.whatwg.org] On Behalf Of Boris Zbarsky
Sent: 01 June 2015 16:19
To: whatwg@lists.whatwg.org
Subject: 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
[Union Square Software Ltd.]

________________________________

[Partners]

The contents of this e-mail are confidential, may contain privileged material and is intended solely for the recipient(s) named above. If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information within it is strictly prohibited and may be unlawful. If you receive this in error, please return it to response@unionsquaresoftware.com immediately and delete this e-mail.

Received on Monday, 1 June 2015 16:18:22 UTC