What is the difference between data URI and data URL?
Look here. Both of these terms are used, but how are they different?
By the way, this is different from the posts mentioned to be possible duplicates. It's not a HTTP question ! This is javascript.
URIs are a superset of URLs. All URLs are URIs, but some URIs are not URLs. This answer has the proper definitions. As you can surmise by reading them, there's a gray area that depends on context.
As for your specific question, getDataUrl()
returns an URI. It is not a URL, since it doesn't really include any information regarding how to locate the resource externally. The function is not named appropriately, as the MDN link reflects.
But, this information is implicit: as the data blob lives inside the URI itself, there's only one place where it can be found. So you could argue, as you sip from your tea and adjust your monocle, that it is a URL, since no further clarification about protocol, schema or location is needed.
In other words, this is highly subject to interpretation. I wouldn't pay much mind to it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With