Pages
User Documentation

data

Data URLs let small document data be included in the URL itself. This is useful for very small HTML test cases, or other occasions that don't justify a document of their own.

data:,foobar (note the comma after the colon) delivers a text document that contains nothing but foobar.

That example delivered a text document. For HTML documents, you have to specify the MIME type text/html: data:text/html,<title>Testcase</title><p>This is a testcase</p>. This produces exactly the same output as if the content had been loaded from a document of its own.

You can also specify other character sets. Note that 8-bit characters have to be escaped by a percent sign and their two-digit hexadecimal codes: data:;charset=iso-8859-1,Gr%FC%DFe aus Schl%E4gl results in Grüße aus Schlägl, whereas omitting the charset attribute might lead to something like Gr??e aus Schl?gl.

IETF RFC 2397 has more information.

Adapted for SonicDE from invent.kde.org/frameworks/kio/-/blob/master/docs/kioworker6/data/index.docbook by Leo Savernik, licensed under GFDL 1.2 or later.

Edit this page on GitHub

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.