W3C home > Mailing lists > Public > public-html@w3.org > January 2010

Re: <iframe doc="">

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Sat, 16 Jan 2010 22:43:46 -0500
Message-ID: <7c2a12e21001161943m1dcf920ekefa08bc98ccdd115@mail.gmail.com>
To: "Michael A. Puls II" <shadow2531@gmail.com>
Cc: Karl Dubost <karl+w3c@la-grange.net>, "Edward O'Connor" <hober0@gmail.com>, Ian Hickson <ian@hixie.ch>, public-html WG <public-html@w3.org>
On Sat, Jan 16, 2010 at 8:54 PM, Michael A. Puls II
<shadow2531@gmail.com> wrote:
> Here's an example of @doc vs. @src="data:text/html,":
>
> <!DOCTYPE html>
> <html>
>    <head>
>        <meta charset="utf-8">
>        <title></title>
>    </head>
>    <body>
>        <iframe
> src="data:text/html;charset=utf-8,%3C!DOCTYPE%20html%3E%0D%0A%3Chtml%3E%0D%0A%20%20%20%20%3Chead%3E%0D%0A%20%20%20%20%20%20%20%20%3Cmeta%20charset%3D%22utf-8%22%3E%0D%0A%20%20%20%20%20%20%20%20%3Ctitle%3Etest%3C%2Ftitle%3E%0D%0A%20%20%20%20%3C%2Fhead%3E%0D%0A%20%20%20%20%3Cbody%3E%0D%0A%20%20%20%20%20%20%20%20%3Cp%3Etest%3C%2Fp%3E%0D%0A%20%20%20%20%3C%2Fbody%3E%0D%0A%3C%2Fhtml%3E"></iframe>
>        <iframe
> src="data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw%2BDQo8aHRtbD4NCiAgICA8aGVhZD4NCiAgICAgICAgPG1ldGEgY2hhcnNldD0idXRmLTgiPg0KICAgICAgICA8dGl0bGU%2BdGVzdDwvdGl0bGU%2BDQogICAgPC9oZWFkPg0KICAgIDxib2R5Pg0KICAgICAgICA8cD50ZXN0PC9wPg0KICAgIDwvYm9keT4NCjwvaHRtbD4%3D"></iframe>
>        <iframe doc='<!DOCTYPE html>
> <html>
>    <head>
>        <meta charset="utf-8">
>        <title>test</title>
>    </head>
>    <body>
>        <p>test</p>
>    </body>
> </html>'></iframe>
>    </body>
> </html>

That's not a fair comparison, I don't think.  You don't need to
urlencode everything in the data URL, and most of the boilerplate you
give can be omitted in text/html.  On the other hand, you don't need
to include all the boilerplate for doc="".  So the real comparison is

<iframe doc="<p>test">

vs.

<iframe src='data:text/html,<!doctype html><p>test'>

The difference is fairly minor.
Received on Sunday, 17 January 2010 03:44:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:57 GMT