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

Re: make links within an iframe replace the parent document

From: Constantine A. Murenin <mureninc@gmail.com>
Date: Mon, 20 May 2013 13:12:13 -0700
Message-ID: <CAPKkNb5XvMhsTvRxnLNuorq6W-pJLqT8-TQyn8McbyUhofa3Xw@mail.gmail.com>
To: public-html@w3.org
OK, from the complete and utter silence, I gather there must be
absolutely no way to do this!  Is that indeed so?  Could someone
please comment?  Is there at least any JavaScript one-liner that could
address the situation, or is no such thing possible, due to the
same-origin rules?


On 17 May 2013 09:08, Constantine A. Murenin <mureninc@gmail.com> wrote:
> Hello,
> 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,
> Constantine.
Received on Monday, 20 May 2013 20:12:45 UTC

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