Talk:Data URI scheme
![]() | This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||
|
Untitled
[edit]Perhaps someone could add a brief introduction and a link to the "data: URL" page on the main "URL" page?
They are really URIs
[edit]I think this article should be renamed to data: URI, and replace all references to URL with URI, retaining the historical aspect of them being called URLs. data: URL should be redirected there. Hrvoje Šimić 12:42, 17 November 2005 (UTC)
According to RFC 2397, it is considered a URL, despite the fact that data: is not a locator. For that matter, it isn't really an identifier either; it's more like a container. - Brianiac 19:30, 18 November 2005 (UTC)
- It's a tricky issue. Let me try to explain why I think data: scheme URIs should not be considered URLs, despite they being called that in the relevant specification. They are URIs, even if you consider them URLs, since all URLs are URIs. The RFC 2397 calls them URLs, but I haven't found any formal or informal references implying that they should be considered URLs. It's as if the authors didn't know what URIs mean, so they called them URLs. RFC 3986 (see section 1.1.3) and documents from the Technical Architecture Group specify that URIs should not be considered URLs if they are not explicitly used as locators. In particular, URI schemes are not to be classified as specific URL or URN schemes. Hrvoje Šimić 09:38, 21 November 2005 (UTC)
- Well, I'm going around clearing up all the articles we have on the topic, and I think we need a standard and uncontroversial naming scheme. Since all URLs are also URIs, I figure that all "URL schemes" are also "URI schemes", so at worst it is "not specific enough" to use the latter. For consistency, therefore, I'm going to rename all the articles about schemes which deserve an article "<scheme>: URI scheme". I'm also going to put in place lots of redirects, because I actually missed this page when searching once, and almost created a new one. I hope no one is "offended" by this, it just seems sensible to be consistent. - IMSoP 22:49, 8 December 2005 (UTC)
- Sounds reasonable. -- Brianiac 22:16, 22 March 2006 (UTC)
- After much consideration, I have to disagree about the URI designation. Not only is the standard explicit, but URI is used to refer to URLs and URNs, it isn't an actual concrete type itself. Data URLs are not URNs because they are not an identifier; they don't represent a name, nor any kind of canonical designator. It locates the data, i.e. inside the URL itself, ∴ URL. Brianary (talk) 15:19, 31 March 2015 (UTC)
Data: URIs in CSS
[edit]Just a note on data uri's in CSS. Non-alphabetic characters must be escaped by backslashes. Refer to this bugzilla entry:https://bugzilla.mozilla.org/show_bug.cgi?id=319779
- Updated the bugzilla entry. No backslashes are necessary save for the comma, and that can be skipped if the URL is quoted. Brianary (talk) 18:46, 18 August 2008 (UTC)
- Another update: I've found that with quotes, you still can't have unescaped line breaks (Chrome 47 & Firefox 43 on Debian). Adam KatzΔ☎ 19:31, 28 January 2016 (UTC)
Disadvantages
[edit]Am I correct in thinking that data: does not support specifying http headers such as content-disposition, so suggested names for saving cannot be given, nor transparent gzip compression specified. If that's correct, it should be listed in the disadvantages. Also the lack of content negotiation.
- True, Content-Disposition is not available. Compression and content negotiation are not available, either. Good points, anonymous stranger. ;) -- Brianiac 22:23, 22 March 2006 (UTC)
- Actually, now that I think about it, the multipart/alternative MIME type can be used for content negotiation, and similar containers (multipart/parallel, message/rfc822, etc.) might be used to support compression and Content-Disposition. It all depends on your processing environment. A simple image included as part of a web page may not support these workarounds, though.
- Compression is available through the containing document. For instance, any SVG image passed as a data: URI in a CSS stylesheet will be compressed as part of the CSS stylesheet itself. Compressing the content of the data: URI itself would make no sense. — Preceding unsigned comment added by 113.151.4.122 (talk) 09:50, 25 January 2012 (UTC)
- The article claims that the overhead is "reduced to 2–3% if the HTTP server compresses the response using gzip". There is a citation to back up this claim, but you need only try it out with a couple of real-world examples to see that it's simply not true. The overhead is typically very close to that of the Base64, i.e. around 30%.
What Copyvio?
[edit]For some reason, this article has copyvio flags. There is no copyright violation, as RFC 2397's copryight statement allows (if not encourages) copying. As the pertient section of the "Full Copyright Statement" states:
- This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.
-- NeoAmsterdam 04:57, 12 April 2006 (UTC)
I've highlighted what seems to me to be the problematic part.
-- Uldoon 14:12, 14 April 2006 (UTC)
Every RFC seems to have the copyright part inserted, so if Data: URI's would be infringing, somebody should check out the pages for E-Mails, HTTP, IRC, Jabber, etc. because they are all RFC's
-- The Decryptor 16:18, 20 April 2006 (UTC)
- I do not think copying from RFCs, especially for informative purposes, constitute a copyright violation. --soUmyaSch 10:02, 1 May 2006 (UTC)
- The RFC says:
Copyright (C) The Internet Society (1998). All Rights Reserved.
- When you contribute anything to Wikipedia, you agree to this:
You agree to license your contributions under the GFDL.
- Only the copyright holder has the right to relicense their work. (Boborok 16:05, 10 May 2006 (UTC))
Just in response to "if Data: URI's would be infringing, somebody should check out the pages for E-Mails, HTTP, IRC, Jabber, etc. because they are all RFC's" - none of our articles should be verbatim copies of RFCs, since RFC content is not, per se, encyclopedic; Wikipedia is not a primary source. However, many articles will discuss and even quote from copyrighted standards, but neither of those would constitute copyright infringement, so there's very unlikely to be a problem. - IMSoP 13:06, 21 September 2006 (UTC)
data: URI examples
[edit]Also, I would like to add data: URI examples but how do I link to them? I tried [data:,] and <a href="data:,"> formats but neither are turned into links... How do I do this? (Boborok 16:05, 10 May 2006 (UTC))
- Its better to avoid them, bcoz it wont be accessible by 85% (whatever the market share of ie is) of the web browsing public. --soUmyaSch 19:30, 10 May 2006 (UTC)
- These stats [1] show 72% but I think it would be significantly less among users reading the data: URI article. Anyway it looks like there is no way to add them :) (Boborok 21:34, 10 May 2006 (UTC))
Looks like IE8 should support this
[edit]According to this: http://blogs.msdn.com/ie/archive/2007/12/19/internet-explorer-8-and-acid2-a-milestone.aspx#6810063 —Preceding unsigned comment added by 70.183.120.25 (talk) 08:44, 20 December 2007 (UTC)
The page currently reads "[the data URI scheme] is supported (restricted to embedding images in css) by Internet Explorer 8 Beta 1" but a Microsoft white paper ([2]) indicates that data URIs may be used in object, img, link, and css elements in html. MS documentation isn't always right and I don't have IE8b1 installed to verify it so I won't edit the article. —Preceding unsigned comment added by 130.20.172.96 (talk) 01:58, 22 August 2008 (UTC)
IE about: urls
[edit]I removed:
- Early versions of Internet Explorer treated unrecognised about: URIs as HTML source, so something like
about:<b>bold</b>
in these versions was broadly equivalent todata:text/html,<b>bold</b>
in browsers that support data: URIs[citation needed]
because
- No references
- Doesn't specify which versions
- Not even quite true: Whereas data: URIs are most useful in including an image, like
data:image/gif;base64,aoeu023ithaoeu
, not displaying bold text or a web page.About:
would not seem to be very equivalent. - Not a very useful fact, since it does not provide an alternative to
data:
as the latest versions of IE do not support it, and as it would not allow the inclusion of images (AFAIK) as notod above. - For something so irrelevant, it was one of the first things in the article. Perhaps it should be moved to something like a "see also" section.
If you disagree, please discuss it. --Temporitron (talk) 19:45, 10 January 2008 (UTC)
server-side / PHP
[edit]I'm going to quibble with this. Disk use is not necessarily increased... if the script is generating a CSS page, the server only has to access the image files exactly as many times as it would have if they were referenced in the standard way: either the server loads the file to create the base64 encoding, or the client makes the server serve the file when the client is rendering the page. I removed the bold section and feel it should stay gone. --Temporitron (talk) 19:57, 10 January 2008 (UTC)
this entry quality is horrible. Need lots of enhancements. --Tei
Safari 3
[edit]The commentary about Safari needs some clarity. I've read the paragraph several times and can't tell if it means yes, Safari does render data: URIs, or no it doesn't. (In fact, Safari 3 does.) Using "although" starts an inversion, a negating clause. Can that paragraph be rewritten so any average reader would know what the final answer is? I can't because I'm not sure what point it was making exactly. John Sinclair (talk) 08:34, 25 May 2008 (UTC)
Cookies
[edit]"Cookies are not supported." - Eh? Isn't this rather like saying that <h1>
tags don't support cookies? —Preceding unsigned comment added by 81.2.73.194 (talk) 12:58, 20 June 2008 (UTC)
- Cookies can be part of any HTTP request, and so in the unlikely event that a web site changed what file it sent in the HTTP response based on cookies, data URIs could not be used. Really though, it's a minor problem because the host document can still use cookies. —Remember the dot (talk) 04:51, 22 August 2008 (UTC)
- No, it's like saying that cookies aren't supported on items loaded over the FTP or Gopher protocols, given that that is the case. Nitro2k01 (talk) 17:54, 18 June 2011 (UTC)
Summary Paragraph
[edit]Today the last paragraph of the summary says "and data URIs have now been implemented in most browsers" though I don't really understand when that was written, when is "now". Should say something like "and data URIs have been implemented in most browsers by 2009" or whenever that happened. --93.172.144.206 (talk) 15:20, 23 March 2009 (UTC)
Internet Explorer, Outlook, Outlook Express
[edit]I'm sure data: worked in some earlier versions of IE - around 2003 ? Or was it just in HTML emails viewed in Outlook (Express) ? Maybe it was undocumented ... --87.194.174.252 (talk) 10:57, 5 August 2009 (UTC)
Slashes
[edit]Could somebody rewrite "features/UA detection/discrimination" without the slashes? I can't understand it. Unfree (talk) 21:26, 6 December 2009 (UTC)
"data URIs encoded may contain whitespace for readability."
[edit]Added "with base64", as the ability to add whitespace is not a general property of data URIs, but is a property of the base64 encoding. Nitro2k01 (talk) 22:24, 21 May 2011 (UTC)
Other Uses.
[edit]I see no mention of this URI scheme with another use that has come into play: A VoIP "do not call" function. Example (fictitious):
2.1.2.1.5.5.5.0.0.8.1.e164.org. IN NAPTR 100 10 "U" "E2U+X-DNC" "!.*!data:,2047!" .
See http://www.e164.org/wiki/DoNotCall for further details regarding this usage. - 71.106.211.51 (talk) 23:06, 29 December 2011 (UTC)
"Referencing the same resource (such as an embedded small image) more than once from the same document results in multiple copies of the embedded resource."
[edit]Surely this only applies if the same data is naively inserted several times into the source. It could just as well be a single Javascript variable, referenced as many times as needed. Unless I'm missing something, this entry should be removed from the list. 195.212.29.89 (talk) 11:23, 4 February 2014 (UTC)
Parallel connections
[edit]I removed an outdated assertion that most browsers limit the number of connections to a web server to 2. Although this is the recommended value by the HTTP RFC, most current browsers ignore this recommendation and use a higher figure. I've included a reference to back this claim up - although it is self-published (a blog) it is published by an acknowledged expert in the field (Steve Souders, who is currently employed as the chief performance engineer at google) who has previously been published on the subject area (High Performance Web Sites: Essential Knowledge for Front-End Engineers, O'Reilly 2007), so should meet all requirements of WP:V. 212.159.69.4 (talk) 07:26, 10 February 2014 (UTC)
The Data segment description is wrong
[edit]The data segment is describe as being octets of letters and numbers only and required %nnn encoding otherwise. I suspect this constraint is with respect to the character set selection and seems to be irrelevant when the data is binary encoded via the base64 designation, as shown in the examples. — Preceding unsigned comment added by 99.244.115.138 (talk) 22:40, 15 February 2016 (UTC)
- This is incorrect. See Section 3 of RFC 2397, Syntax, and Section 2 of RFC 2396, URI Characters and Escape Sequences. — Scott • talk 23:10, 15 February 2016 (UTC)
Scott, then please explain why the HTML example is in contradiction (presence of / and =) Geompse (talk) 10:15, 20 August 2016 (UTC)
Lowercase title
[edit]Why is the title "data URI scheme"? Shouldn't it be "Data URI scheme"?
--Mortense (talk) 11:16, 26 January 2021 (UTC)
- @Mortense: I don't know why the title was changed to lowercase: was the original capitalization correct? Jarble (talk) 19:08, 16 February 2021 (UTC)
- The title of the the RFC that standardised it is 'The "data" URL scheme'. Note here that "data" is not a part of the sentence, it is the name of the scheme - it is not just "a scheme for data", it is "a scheme whose name is data"; and since case matters in computing, it is not "a scheme whose name is Data" either. The distinction is perhaps easier to understand with something like mailto which isn't an English word - "mailto" is just the string of letters that identifies that scheme, and is always lower-case, so writing "Mailto" wouldn't make sense. - IMSoP (talk) 18:25, 17 February 2021 (UTC)