Confirmed users, Bureaucrats and Sysops emeriti
812
edits
No edit summary |
|||
| Line 1: | Line 1: | ||
== Update URL | |||
A new URL type to OpenSearch descriptors: application/x-opensearch-update | |||
'''Example:''' | '''Example:''' | ||
| Line 5: | Line 7: | ||
<pre> | <pre> | ||
<Url type="application/x-opensearch-update" | <Url type="application/x-opensearch-update" | ||
template="https://www.foo.com/searchupdater?version={version}"/> | template="https://www.foo.com/searchupdater?version={version}"/> | ||
</pre> | </pre> | ||
version will default to 0 if | version will default to 0 if there is no <Version> element. | ||
On first use of a search descriptor after the expiry date (defined in the <Expires> element, defaults to 0 if not present), the UA will do a GET request to the URL specified, with the version attribute substituted for {version}. (i.e. https://www.foo.com/searchupdater?version=foo). If there are no changes, return an HTTP 304 Not Modified response to the client. The UA should update the expiry to the minimum next interval on this response. In order to minimize failed attempts, any errors will be treated as no update available. | |||
On first use of a search descriptor after the expiry date, the UA will do a GET request to the URL specified, with the version attribute substituted for {version}. (i.e. https://www.foo.com/searchupdater?version=foo). If there are no changes, return an HTTP 304 Not Modified response to the client. The UA should update the expiry to the minimum next interval on this response. In order to minimize failed attempts, any errors will be treated as no update available. | |||
If an update is available, the new search descriptor should be returned by the server and parsed by the UA. The new version will be used in place of the original version. If expires is less than the minimum update interval, that value should be bumped to satisfy that requirement. If there is no version provided, we should increment the version from the previous version. If the base updateURL is different, the update MAY (MUST) be rejected by the UA. | If an update is available, the new search descriptor should be returned by the server and parsed by the UA. The new version will be used in place of the original version. If expires is less than the minimum update interval, that value should be bumped to satisfy that requirement. If there is no version provided, we should increment the version from the previous version. If the base updateURL is different, the update MAY (MUST) be rejected by the UA. | ||
| Line 31: | Line 29: | ||
<Version>47</Version> | <Version>47</Version> | ||
== Expires element == | |||
Optional: Contains an expiration time in standard timestamp format, used with update URLs | |||
Parent: OpenSearchDescription | |||
Restrictions: The value must contain 256 or fewer characters of plain text. The value must not contain HTML or other markup. | |||
Requirements: This element may appear zero or one time. | |||
Example: | |||
<Expires>1222215762335</Expires> | |||
== Forced Updates == | == Forced Updates == | ||
If a UA navigates to a search descriptor served with application/opensearchdescription+xml on the same origin (host+scheme+port) as the updateURL, and the updateURL matches, the UA SHOULD simply update the locally stored version. UAs SHOULD NOT prompt the user for confirmation. | If a UA navigates to a search descriptor served with application/opensearchdescription+xml on the same origin (host+scheme+port) as the updateURL, and the updateURL matches, the UA SHOULD simply update the locally stored version. UAs SHOULD NOT prompt the user for confirmation. | ||