opensearch_将OpenSearch添加到您的网站并进入浏览器的搜索框

news/2024/5/12 9:20:29/文章来源:https://blog.csdn.net/cunfusq0176/article/details/109083442
opensearch

opensearch

I was over at http://search.twitter.com earlier today and I noticed the Search Box in Firefox had a blue lit-up dealie:

我今天早些时候在http://search.twitter.com结束了,我注意到Firefox中的搜索框有一个蓝色的亮点。

image

Hm...OK. What's that? I hit another site and didn't see it. Weird. Ok, View-Source then, what drives you little blue thing?

嗯...好。 那是什么? 我访问了另一个网站,但没有看到它。 奇怪的。 好吧,那么查看源代码,是什么促使您感到沮丧呢?

<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Twitter Search">

Hey, that's not something I've seen before. What's in it...http://search.twitter.com/opensearch.xml...

嘿,那不是我以前见过的东西。 里面有什么... http://search.twitter.com/opensearch.xml ...

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Twitter Search</ShortName>
<Description>Realtime Twitter Search</Description>
<Url type="text/html" method="get" template="http://search.twitter.com/search?q={searchTerms}"/>
<Image width="16" height="16">http://search.twitter.com/favicon.png</Image>
<InputEncoding>UTF-8</InputEncoding>
<SearchForm>http://search.twitter.com/</SearchForm>
</OpenSearchDescription>

Ah! I totally get it. Excellent. I shall make my own immediately! I added this file to my website and added a <link> line as seen in the first example above that pointed to it.

啊! 我完全明白。 优秀的。 我将立即做自己的! 我将此文件添加到我的网站,并添加了<link>行,如在上面的第一个示例中所指向的。

<?xml version="1.0" encoding="UTF-8" ?> 
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Hanselman Search</ShortName>
<Description>Search Scott Hanselman's Blog</Description>
<Url type="text/html" method="get" template="http://www.hanselman.com/blog/...snip...q={searchTerms}"/>
<Image width="16" height="16">http://www.hanselman.com/blog/favicon.ico</Image>
<InputEncoding>UTF-8</InputEncoding>
<SearchForm>http://www.hanselman.com/</SearchForm>
</OpenSearchDescription>

Bam.

am

image

I wonder if it works in IE7?

我想知道它是否可以在IE7中使用吗?

image

Pow! I wonder if Live.com supports it?

ow! 我想知道Live.com是否支持它?

image

Eek! FAIL. I'll mention that to someone at Live.com

ek! 失败。 我会在Live.com上向某人提及

OpenSearch is a really easy feature that you can add to your website in literally minutes. Seconds if you type fast. Check me out noticing this only three years late. :)

OpenSearch是一项非常简单的功能,您可以在几分钟内将其添加到您的网站。 快速输入秒数。 让我注意一下,发现这仅晚了三年。 :)

Give it a try!

试一试!

IMPORTANT NOTES: Make sure you include the first line of the XML file (the XML declaration) or IE will ignore it and nothing will happen when you add it. Also, make sure you include the default XML namespace or Firefox will give you an error: "Firefox could not download the search plugin"

重要说明:确保包括XML文件的第一行(XML声明),否则IE将忽略它,并且在添加时什么也不会发生。 另外,请确保您包括默认的XML名称空间,否则Firefox将给您一个错误:“ Firefox无法下载搜索插件”

OpenSearch,OpenSearch ,Blog博客

翻译自: https://www.hanselman.com/blog/adding-opensearch-to-your-website-and-getting-in-the-browsers-search-box

opensearch

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.luyixian.cn/news_show_728657.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

手把手教你搭建一个属于自己的网站

​ 其实去年就写过一篇&#xff0c;当时写的很简短&#xff0c;算是基础的基础&#xff0c;今天就再来一起分享下网站建设方面的知识。看过之前我写的那篇的可以直接从基础篇备案看起。 ps&#xff1a;以下内容为了便于理解&#xff0c;部分是本人自己理解总结&#xff0c;非官…

日常浏览网站整理

2019独角兽企业重金招聘Python工程师标准>>> 工具网站 imgbase64 bejson 开源网站 spring4All美团技术团队博客阿里云栖社区bittiger聚客网我全科牛人博客地址 你假笨JVM博客地址 徐靖峰博客地址 芋道源码 纯洁的微笑 王亚普 程序员DD 阿里-李鼎 阿里-梁飞 …

写论文的时候会经常使用到的技巧、网站、工具整理【转载】

学习需要&#xff0c;非商业转载&#xff0c;如有侵权请及时联系&#xff0c;立删&#xff0c;十分抱歉 工具汇总一&#xff1a; 知乎地址&#xff1a;https://zhuanlan.zhihu.com/p/25595196 &#xff08;16.02.27 更新&#xff09;以下内容包括&#xff1a;选择正确的英文词语…

大型分布式网站架构技术总结

网址&#xff1a;http://www.cnblogs.com/itfly8/p/4967966.html本文是学习大型分布式网站架构的技术总结。对架构一个高性能&#xff0c;高可用&#xff0c;可伸缩&#xff0c;可扩展的分布式网站进行了概要性描述&#xff0c;并给出一个架构参考。一部分为读书笔记&#xff0…

迁移TFS2008后,项目门户网站及Team Explorer的报表均无法正常显示的原因

一、wss 1.检查wss网站集管理员&#xff0c;并且进入该网站查看网站权限。 二、reporting serivce 现象&#xff1a; 通过TeamSystemWebAccess插件进行web访问查询报表时&#xff0c;提示&#xff1a; 处理报表时出错。 (rsProcessingAborted) 无法模拟数据源“TfsOlapReportDS…

asp.net网站怎么启动_新的ASP.NET网站启动

asp.net网站怎么启动A few weeks ago we introduced a beta of a freshly designed http://asp.net website. Today we launched it. Jon, myself, and the team that manages the site took lots of your feedback (lots from the comments of the Beta Blog Post) and did ou…

服务协议隐私政策_隐私链-随着第三方服务的堆积,您网站的隐私政策

服务协议隐私政策There are so many really innovative products online right now. A good friend was showing me amazing product called Intercom that lets you see who of your users are online, their social profiles, even direct message/chat them live on your si…

前端代码在线调试分享网站

1、RunJs 2、CodePen 3、JsFiddle

带命令行的嵌入式系统_带有嵌入式命令行的网站:您的命令行进入了我的Internet

带命令行的嵌入式系统Eight years ago I wrote a post called Opportunity: Windows is completely missing the TextMode boat. The language is dated... 八年前&#xff0c;我写了一篇名为《机会&#xff1a;Windows完全没有TextMode的小船》的文章。 语言过时了... I assum…

henny penny视频_Penny Pinching视频:在数据中心之间移动Azure网站

henny penny视频I talked about Pinching pennies when scaling in The Cloud last week when I added jQuery lazy loading to my podcasts Website. I wanted to avoid paying any unnecessary bandwidth costs. The result was great and Ill be under my bandwidth this mo…

梁斌penny_Penny Pinching在云中:在Windows Azure网站上启用新的文物性能监控

梁斌pennyIve been looking for ways to save money running my (now 12) websites in the cloud lately. Getting insights from logs has been helpful, but I really want more details as to what my app is doing so that I might do less of it. Remember the secret of …

javascript扩展_丰富的新JavaScript代码编辑器,扩展到多个Microsoft网站

javascript扩展I noticed yesterday that some C#, JavaScript and CSS files I had sitting in SkyDrive were suddenly editable. 昨天我注意到&#xff0c;我坐在SkyDrive中的一些C&#xff03;&#xff0c;JavaScript和CSS文件突然可以编辑。 Not just editable, but ther…

前端资源(框架,库,网站)

前端有很多优美的框架和库&#xff0c;以及一些资源很多的网站和博客&#xff0c;今天我准备和大家分享分享 框架 库 插件 工具 网站 &#xff08;由于Vue和React的UI库比较多&#xff0c;我将在下一篇文章中展示&#xff09; 框架 Vue: Vue (读音 /vjuː/&#xff0c;类似于 v…

mac azure git_从一个Git存储库将两个网站部署到Windows Azure

mac azure gitDeploying to Windows Azure is very easy from Git. I use the Azure Cross-Platform Command Line (open source on github, written in node) that I get from npm via "npm install azure-cli --g" to make the sites. 从Git部署到Windows Azure非常…

Penny Pinching在云中:Azure网站何时有意义?

I had a great conversation on Twitter with Frans Bouma about pricing where he asked a number of questions that werent easily answered in 140 characters. The pricing for these things isnt clear or easy. Its not clear or easy because its complicated. 我在推…

img 平铺._在几分钟内为您的网站制作Windows 8.1固定实时平铺

img 平铺.I actually set this up on my site a few months back when Windows 8.1 preview showed up, but I didnt mention it. If youve got Windows 8.1, youve likely figured out that the most fun apps are ones that have active live tiles. 实际上&#xff0c;几个月…

您要访问的网站包含有害程序_下载包装程序和有害软件纯属邪恶

您要访问的网站包含有害程序Call it Adware, Malware, Spyware, Crapware, its simply unwanted. Every non-technical relative Ive ever talked to has toolbars they apparently cant see, apps running in the background, browser home pages set to Russian Google clone…

修复:Microsoft Edge无法查看或打开VirtualBox托管的本地网站

Im using VirtualBox on a Windows 10 machine along with Docker to deploy ASP.NET websites to local Linux Containers. To be clear, this isnt accessing websites with http://localhost, this is accessing locally an VirtualBox virtual network. 我正在Windows 10计…

是该重新思考一下网站综合监测技术的时候啦

根据维基百科的定义&#xff0c;综合监测&#xff08;也称主动监测&#xff09;技术是指使用Web浏览器模拟或用Web交易的脚本记录来完成的网站监测。它通过创建行为脚本&#xff08;或路径&#xff09;模拟客户或终端用户在网站上执行的操作或路径。然后在设定的时间间隔内持续…

你凭什么说你的网站用户体验好[转]

2019独角兽企业重金招聘Python工程师标准>>> 你凭什么说你的网站用户体验好[转] 2011年03月28日 星期一 13:55 朋友去面试。对方问他&#xff1a;说说你之前做的那个站&#xff0c;有什么地方好的&#xff1f;朋友就说&#xff1a;用户体验比别的站好。对方又问&…