Re: <iframe doc="">

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 UTC