如何告诉Web浏览器关于Atom提要 [英] How To Tell Web Browsers About Atom Feeds

查看:126
本文介绍了如何告诉Web浏览器关于Atom提要的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站有一个Atom提要,我想让它更容易订阅它。我发现很多网站(例如StackOverflow)在Firefox 3的地址栏中都有Atom图标。但是,我还没有弄清楚。



我假设需要一些HTML - 但是哪些标签指定了浏览器中的一个页面有一个feed? 解决方案

(所有!)其他答案是绝对正确的,如果使用的格式实际上是Atom,我会建议反对给你的feed标题RSS。当然,RSS是指饲料和企业联合组织的完全独立的格式,普通人群之间存在着足够的混淆,关于我不建议喂火的区别。 : - )

请根据您的Feed为您的Feed提供更具描述性的标题(例如新闻Feed,博客Feed,漫画等)内容。另外,如果您有多种类型的内容,您绝对可以在同一页面中包含多个Feed链接!

 < link rel =alternatetype =application / atom + xmltitle =Newshref =/ atom.xml?type = news/> 
< link rel =alternatetype =application / atom + xmltitle =Bloghref =/ atom.xml?type = blog/>


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 haven't, however, been able to work out how.

I assume some HTML is needed - but what tags specify the the browser that a page has a feed?

解决方案

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" />

这篇关于如何告诉Web浏览器关于Atom提要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆