现在有一段时间了,地址栏不仅显示当前页面的地址,而且还允许您在不同的搜索引擎中打开搜索页面。但是并非所有站点都添加了OpenSearch,因此您可以轻松地添加内部站点搜索。
在第一部分中,我将告诉您如何自己添加站点搜索和其他服务。在第二部分中,我将告诉您除了可以使用OpenSearch提示进行搜索之外,还可以组织网站的服务。
OpenSearch是使网站和搜索引擎能够以易于分发和收集的格式发布搜索结果的一组技术。
我们使用%s键抽出地址栏
%s网址中的密钥分别由浏览器FireFox和Chrome替换为书签或搜索引擎的网址的简称之后输入的短语。
火狐浏览器
Firefox允许在书签URL中使用此密钥。URL中的此键将替换为书签简称后输入的短语。
手动添加
要手动添加书签,请打开所有书签(Ctrl + Shift + B)。按下控制按钮和“新建书签...”项。在这种情况下,书签属性的所有字段都将立即可用,但是您必须手动填写。
我们自动添加
%s( ) . title. .
. .
Chrome
Chrome URL %s [ (chrome://settings/searchEngines).
Wayback Machine
: Wayback Machine
: "https://web.archive.org/web/%s"
: "-"
: "- https://example.com"
Wayback Machine HTTPS. '- ' . Wayback Machine .
:
: "https://habr.com/search/?q=%s"
: "-"
: "- "
. .
:
: "https://habr.com/p/%s"
: "-p"
: "-p 489638"
. . .
:
: "https://habr.com/ru/users/%s"
: "-u"
: "-u ivan386"
. 4 "-u ivan386". .
. %s URI +.
OpenSearch
OpenSearch . URL . .
OpenSearch . .
Firefox
Firefox OpenSearch @ . FireFox OpenSearch . .
OpenSearch . . .
. @ . .
:
:
-
@ -
@wiki. -
Open. -
OpenSearchEnter .
OpenSearch
.
:
- opensearch-demo
- " "
- (about:preferences#search) " "
- ""
- " "
- :
@demo
:
-
@ -
@demo. -
-. -
. -
EnterEsc.
OpenSearch <head> :
<link rel="search"
href="https://example.com/opensearchdescription.xml"
type="application/opensearchdescription+xml"
title="Search" />
opensearchdescription.xml:
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<!-- -->
<ShortName>Search</ShortName>
<!-- ( ) -->
<Image type="image/png">https://example.com/websearch.png</Image>
<!-- URL -->
<!-- Firefox Url "text/html" -->
<Url method="get" type="text/html"
template="https://example.com/?q={searchTerms}"/>
<!-- URL ( ) -->
<Url method="get" type="application/x-suggestions+json"
rel="suggestions"
template="https://example.com/suggest?q={searchTerms}" />
</OpenSearchDescription>
URL {searchTerms} . '+' URI .
URL JSON :
["{searchTerms}",[
" ",
" "
]]
{searchTerms} .
:
: "@wiki XML Encryption"
JSON:
["XML Encryption", ["XML Encryption"]]
OpenSearch
.
, .
:
: @habr
:@habr -
:
. . ( )
Enter.
:@habr
:
XML XML — IPFS XSLT 16GB 4GB
. 9 . .
:@habr
:
" " $1000000
.
:@habr
:
. FireFox OpenSearch. URL .
Enter. Esc .
. .
OpenSearch .