In the current HTML5 specification, one can POST a form to an action with the data scheme:
It basically embeds the form data into a placeholder of the action attribute and navigates to the resulting data: url.
In the form submission algorithm described by the specification linked above, it is step 17.
I understand how the algorithm works. I wonder, though, whether there are any use cases for this facility in web applications. Are there any meaningful resources one can create this way (and for which there is no easier way to accomplish them)?
I've seen this used in HTML5 drawing applications. Harmony by Mr. Doob is a great example: http://mrdoob.com/projects/harmony/
You hit save, and you're taken to a data:url that is your image rendered as a png from that url.
This feature enables debugging how a browser treats a form without using a server. I think it would be particularly interesting if I were having difficulty with the encoding of a given form. Replacing an actual application URL with a data URI would allow you to see the form content that would be transmitted via
POST
.That said, I wonder if this feature is implemented anywhere.
As for use in applications, there are more flexible ways to generate a data URL. It could be convenient if one had a page that was going to extract the substituted form data, parse it, and do something with it, but the extra level of indirection in the data URI seems unnecessary.