W3C home > Mailing lists > Public > public-html@w3.org > April 2015

Relative links in seamless iframes

From: Andrea Rendine <master.skywalker.88@gmail.com>
Date: Sun, 5 Apr 2015 21:47:35 +0200
Message-ID: <CAGxST9n_fvN5kw0ZJ_a45jFRPEBFjexjsc+xXrsFE7HpMwvZ4Q@mail.gmail.com>
To: "public-html@w3.org LIST" <public-html@w3.org>
Looking at the spec, it is clear that iframes in seamless mode must act, if
possible, as part of the document containing their nested browsing context.
One thing is missing, though. The base URL to resolve relative URL in links
of nested browsing contexts, as well as embedded resources throughout the
nested browsing context's document, is obtained in relation with nested
Wouldn't it be possible to set base URL for nested document using container
document's base URL? It should be possible at least in case the container
has a frozen base URL and the nested document hasn't.

I was writing a JS snippet capable of using pushState along with a query
string for keeping track of iframe navigation. This script appends a query
parameter in the form of "iframe_name=iframe_document_relativeURI" to the
address of the page, so that the URI can keep track of the current page
state. This is primarily for link sharing, but anyway the src attribute is
updated server-side for possible reuses (e.g. sitewide link mapping). The
problem is, nested page sets the querystring using relative URL of the link
for site navigation, and relative URLs rely upon nested document's base
URL. If for any reason container and nested documents' bases do not
coincide (e.g. the nested document is specified by a file in a different
directory), URL retrieval is not possible (of course I currently solve the
problem using a consistent sitewide <base> element so that all relative
URIs are resolved according to the same base).

Are there any technical issues in doing that? Also consider that there
would be no backward compatibility issue, as no browser currently
implements @seamless.
Received on Sunday, 5 April 2015 19:48:02 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:43 UTC