dwww Home | Show directory contents | Find package

<FILENAME filename="index.html"><html><head><title>Data URLs</title><link rel="stylesheet" type="text/css" href="help:/kdoctools5-common/kde-default.css"><link rel="stylesheet" type="text/css" href="help:/kdoctools5-common/kde-docs.css"><link rel="stylesheet" type="text/css" href="help:/kdoctools5-common/kde-localised.css"><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="index.html" title="Data URLs"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.14 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div id="content"><div id="header"><div id="header_content"><div id="header_left"><div id="header_right"><img src="help:/kdoctools5-common/top-kde.jpg" width="36" height="34"> Data <acronym class="acronym">URL</acronym>s</div></div></div></div><div class="navCenter"><table class="navigation"><tr><td class="prevCell"></td><td class="upCell"> </td><td class="nextCell"></td></tr></table></div><div id="contentBody"><div lang="en" class="article"><div class="titlepage"><div><div><h2 class="title"><a name="data"></a>Data <acronym class="acronym">URL</acronym>s</h2></div><div><div class="authorgroup"><p class="author"><span class="firstname">Leo</span> <span class="surname">Savernik</span> </p></div></div></div><hr></div><p>Data URLs allow small document data to be included in the <acronym class="acronym">URL</acronym> itself.
This is useful for very small <acronym class="acronym">HTML</acronym> testcases or other occasions that do not
justify a document of their own.</p><p><strong class="userinput"><code>data:,foobar</code></strong>
(note the comma after the colon) will deliver a text document that contains
nothing but <code class="literal">foobar</code>.
</p><p>The last example delivered a text document. For <acronym class="acronym">HTML</acronym> documents one
has to specify the <acronym class="acronym">MIME</acronym> type <code class="literal">text/html</code>:
<span class="quote">“<span class="quote"><strong class="userinput"><code>data:text/html,&lt;title&gt;Testcase&lt;/title&gt;&lt;p&gt;This
is a testcase&lt;/p&gt;</code></strong></span>”</span>. This will produce exactly the same
output as if the content had been loaded from a document of its own.
</p><p>Specifying alternate character sets is also possible. Note that 8-Bit
characters have to be escaped by a percentage sign and their two-digit
hexadecimal codes:
<span class="quote">“<span class="quote"><strong class="userinput"><code>data:;charset=iso-8859-1,Gr%FC%DFe aus Schl%E4gl</code></strong></span>”</span>
results in
<span class="quote">“<span class="quote"><code class="literal">Grüße aus Schlägl</code></span>”</span>
whereas omitting the charset attribute might lead to something like
<span class="quote">“<span class="quote"><code class="literal">Gr??e aus Schl?gl</code></span>”</span>.
</p><p><a class="ulink" href="https://www.ietf.org/rfc/rfc2397.txt" target="_top">IETF
RFC2397</a> provides more information.</p></div></div><div id="footer"><div class="navCenter"><table class="navigation"><tr><td class="prevCell"></td><td class="upCell"> </td><td class="nextCell"></td></tr><tr><td class="prevCell"> </td><td class="upCell"> </td><td class="nextCell"> </td></tr></table></div><div id="footer_text">Would you like to make a comment or contribute an update to this page?<br>Send feedback to the <a href="mailto:kde-doc-english@kde.org" class="footer_email">KDE Docs Team</a></div></div></div></body></html></FILENAME>

Generated by dwww version 1.15 on Sat May 18 12:18:39 CEST 2024.