From Surf Wiki (app.surf) — the open knowledge base
RSS enclosure
Pointer to a media file from a web feed
Pointer to a media file from a web feed
RSS enclosures are a way of attaching multimedia content to RSS feeds with the purpose of allowing that content to be prefetched. Enclosures provide the URL of a file associated with an entry, such as an MP3 file to a music recommendation or a photo to a diary entry. Unlike e-mail attachments, enclosures are merely hyperlinks to files. The actual file data is not embedded into the feed (unless a data URL is used). Support and implementation among aggregators varies: if the software understands the specified file format, it may automatically download and display the content, otherwise provide a link to it or silently ignore it.
The addition of enclosures to RSS, as first implemented by Dave Winer in late 2000 http://backend.userland.com/rss092, was an important prerequisite for the emergence of podcasting, perhaps the most common use of the feature . In podcasts and related technologies enclosures are not merely attachments to entries, but provide the main content of a feed.
Syntax
In RSS 2.0, the syntax for the tag, an optional child of the element, is as follows:
<enclosure url="http://example.com/file.mp3" length="123456789" type="audio/mpeg" /></syntaxhighlight>
where the value of the ''url'' attribute is a [[Uniform Resource Locator|URL]] of a file, ''length'' is its size in [[byte]]s, and ''type'' its [[mime type]].
It is recommended that only one <enclosure> element is included per <nowiki><item></nowiki>.<ref>{{cite web|url=http://www.rssboard.org/rss-profile#element-channel-item-enclosure|title=RSS Best Practices Profile|website=Rssboard.org|access-date=1 October 2017}}</ref>
== Prefetching ==
The RSS <enclosure> has similarities to:
* the [[Synchronized Multimedia Integration Language|SMIL]] <prefetch> element,
* the [[HTML]] <link> element with rel="prefetch".[https://www.mozilla.org/projects/netlib/Link_Prefetching_FAQ.html]
* the [[HTTP]] Link header with rel="prefetch". (See {{IETF RFC|2068}} section 19.6.2.4.)
* the [[Atom (standard)|Atom]] <link> element with rel="enclosure"
== See also ==
* [[Broadcatching]]
* [[Internet television]]
* [[Podcast]]
* [[Photofeed]]
* [[Vlog]]
==References==
== External links ==
* [http://www.rssboard.org/rss-specification#ltenclosuregtSubelementOfLtitemgt The <enclosure> tag in the RSS 2.0 specification]
* [http://www.xs4all.nl/~foz/mod_enclosure.html mod_enclosure] - Enclosures in RSS 1.x
* [https://www.rssboard.org/rss-enclosures-use-case Enclosure intended use case]
[[Category:RSS]]
[[Category:Web syndication formats]]
[[Category:XML-based standards]]
References
This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.
Ask Mako anything about RSS enclosure — get instant answers, deeper analysis, and related topics.
Research with MakoFree with your Surf account
Create a free account to save articles, ask Mako questions, and organize your research.
Sign up freeThis content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.
Report