- From: Michael A. Puls II <shadow2531@gmail.com>
- Date: Sun, 17 Jan 2010 00:47:13 -0500
- To: "Aryeh Gregor" <Simetrical+w3c@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, 16 Jan 2010 22:43:46 -0500, Aryeh Gregor <Simetrical+w3c@gmail.com> wrote: > 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, Yeh, you can get away with it if you're careful, but it's currently not proper. > and most of the boilerplate you > give can be omitted in text/html. True. But I don't personally omit that stuff in a regular page. I don't think I would in an embedded page either. > 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. Yes, Ian's example showed that @doc is just for fragment markup where standards mode would always be applied and, because it's interpreted as html, HTML, HEAD, BODY (and perhaps TITLE) would be implied and the markup would always end up inside BODY. And, if you make use of implicit closings etc. you can keep things much shorter. However, I still like the idea of explicitly specifying full markup for the embedded doc like you can with src="data:". I also like being able to do src="data:application/xml," in text/html pages. -- Michael
Received on Sunday, 17 January 2010 05:47:47 UTC