I have seen in some browsers (Firefox for example), the RSS feed icon 开发者_JAVA技巧gets activated only when a page contains a RSS/Atom feed. How the browser detects whether the page contains a feed or not?
Just look at the code for this page. You'll see this after some javascript in the header:
<link rel="alternate" type="application/atom+xml" title="Feed for question 'How to detect if a web URL contains a feed or not?'" href="/feeds/question/3020295">
Alternatively, many blogs use
<link rel="alternate" type="application/rss+xml" title="Post Title" href="link-to-post">
精彩评论