Reputation: 7782
I was suprised when I typed the following into the address bar of the browser
data:text,<h1>Whydoesthiswork??</h1>
that it actually worked and HTML output was produced
I dont understand how can this work , isnt the address bar suppose to convert the sitename into a IP address through the lookup on a DNS. I dont think the job of the address bar is to interpret HTML code.
I am confused now
note: I am using Firefox browser.
Upvotes: 0
Views: 97
Reputation: 25220
Take a look at this: data URIs (from the Mozilla Developer Network.)
data URIs, defined by RFC 2397, allow content creators to embed small files inline in documents.
The data URIs have the following syntax:
data:[<mediatype>][;base64],<data>
Upvotes: 2
Reputation: 23863
A URI/URL is made of several pieces. In this context, the protocol
is the most important, and appears as protocol:restOfTheUri
. Common examples of protocols are:
http
https
data
ftp
file
These are all protocols.
When the browser finds the data
protocol, it knows what comes next is all that is needed. There is no need for a network connection or look up.
This is the point of the data:
protocol.
Upvotes: 3