- From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
- Date: Tue, 21 May 2013 07:52:52 +1000
- To: "Constantine A. Murenin" <mureninc@gmail.com>
- Cc: public-html@w3.org
The seamless attribute was indeed created for this use case. It states: "...seamless mode ... will cause links to open in the parent browsing context ..." To avoid XSS issues, same-origin rules apply, so look at the details of http://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-seamless . There is some help for using seamless or seamless replacements at http://stackoverflow.com/questions/4804604/html5-iframe-seamless-attribute . HTH, Silvia. On Tue, May 21, 2013 at 6:12 AM, Constantine A. Murenin <mureninc@gmail.com> wrote: > 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? > > C. > > 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 21:53:43 UTC