W3C home > Mailing lists > Public > public-html@w3.org > May 2013

make links within an iframe replace the parent document

From: Constantine A. Murenin <mureninc@gmail.com>
Date: Fri, 17 May 2013 09:08:03 -0700
Message-ID: <CAPKkNb6_WpeAqxvYv_m8yMkiXRD5NmZjbzX9Ci+TbF0FRjzNpQ@mail.gmail.com>
To: public-html@w3.org

I'm designing a deterministic URL shortener system in nginx, now using
HTML5 and iframes, and I got stuck with not being able to specify that
all links within the iframe on my site, have to be opened up replacing
my site.  (Obviously with the domain of the problem -- URL shortening
-- I generally have no control over the URLs that are loaded within
the iframe.)

I've tried using <base target="_top">, and also a target="_parent" on
the iframe (which is not legal in HTML5, BTW), but to no avail.

I'd very much prefer not to use JavaScript (and even then, it's not
clear whether the same origin policies would even let me to), and I'd
also very much prefer not to confuse my users of where they are by
needlessly and endlessly squatting on the Location Bar.

What are my options?  Does HTML5 not supports any such flows?  I've
noticed there's a new `seamless` attribute, but, apart from still
being unsupported by many browsers, it seems to have some restrictions
in regards to same-origin, plus it's an all-or-nothing solution, and
I'm looking for something in the middle -- the iframe occupying most
of the screen (indeed in a seamless way, already possible through
CSS), plus links opening up such that they replace the parent
document.  Why HTML5 goes all or nothing instead?

On SO: http://stackoverflow.com/questions/16602378/make-links-within-an-iframe-replace-parent-document

Best regards,
Received on Friday, 17 May 2013 20:27:10 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:46:02 UTC