How To Tell Web Browsers About Atom Feeds

后端 未结 1 1194
自闭症患者
自闭症患者 2021-02-12 23:58

My website has an Atom feed and I want to make it easier to subscribe to it. I see that many sites such as StackOverflow have the Atom icon in the location bar in Firefox 3. I h

相关标签:
1条回答
  • 2021-02-13 00:24

    While the code provided in (all!) the other answers is absolutely correct, I would recommend against giving your feed a title of "RSS" if the format used is actually Atom. RSS, of course, refers to an entirely separate format for feeds and syndication and there's enough confusion among the general population about what the differences are that I wouldn't suggest feeding the fire. :-)

    Instead, give your feed a more descriptive title (such as "News feed", "Blog feed", "Comics", etc.) based on your content. Also, it is absolutely possible for you to include multiple feed links in the same page, if you have more than one type of content!

    <link rel="alternate" type="application/atom+xml" title="News" href="/atom.xml?type=news" />
    <link rel="alternate" type="application/atom+xml" title="Blog" href="/atom.xml?type=blog" />
    <link rel="alternate" type="application/atom+xml" title="Comics" href="/atom.xml?type=comics" />
    
    0 讨论(0)
提交回复
热议问题