RSS is easy to work with, but like
any new format, you may encounter some problems in using it. This
section attempts to address the most common issues that arise when
generating a feed.
- Meaningful Links - Give every item in your
feed a distinct URL in the
<link> tag, so that
software can tell the difference between items, and recognize
items that it's already seen. If two items really point at the
same page, you can use different fragment identifiers; e.g.,http://www.example.com/#x2002-09-01
and http://www.example.com/#x2002-09-02.
- Meaningful Metadata - Try to make the
metadata useful on its own; for example, if you only include a
short
<title>, people may not know what the link is
about. By the same token, if you shove an entire article into
<description>, it'll crowd people's view of the feed,
and they're less likely to stay interested in what you have to
say. Generally, you want to put enough into the feed to help
someone decide whether they should follow the link.
- Encoding HTML - Although it's tempting,
refrain from including HTML markup (like
<a href="...">,
<b> or <p>) in your RSS feed; because
you don't know how it will be presented, doing so can prevent your
feed from being displayed correctly. If you need to include a a
tag in the text of the feed (e.g., the title of an item is "Ode to
<title>"), make sure you escape ampersands and angle brackets (so
that it would be "Ode to <title>").
- XML Entities - Remember that XML doesn't
predefine entities like HTML does; therefore, you won't have
© and other common entities
available. You can define them in the XML, or alternatively just
use an character encoding that makes what you need available.
- Character Encoding - Some software generates
feeds using Windows character sets, and sometimes mislabels them.
The safest thing to do is to encode your feed as UTF-8 and check
it by parsing it with an XML parser.
- Version Compatibility - RSS 1.0 generators
need to take special steps to ensure compatibility with 0.9x
parsers; most importantly, use the default namespace for RSS. See
the 1.0 spec for more information.
- Communicating with Viewers - Don't use items
in your feed to communicate to your users; for example, some feeds
have been known to use the
<description> to dictate
copyright terms. Use the appropriate element or module.
- Communicating with Machines - Likewise, use
the appropriate HTTP status codes if your feed has relocated
(usually,
301 Moved Permanently) or is no longer
available (410 Gone or 404 Not Found).
- Making your Feed Cache-Friendly - Successful
RSS feeds see a fair amount of traffic because clients poll them
often to see if they've changed
|
Copyright © 2004 RSS4website.com
AE - 326, Salt Lake City, Kolkata (calcutta), - 700 064, West Bengal,
INDIA
Tele: +91-9830068765
Fax: +91-33-23580807
Email: info@rss4website.com |