<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
<header>
  <title>Client Webtabs</title>
  <abstract>A protocol for displaying web-based tabs in clients.</abstract>
  
<legal>
<copyright>This XMPP Extension Protocol is copyright © 1999 – 2024 by the <link url="https://xmpp.org/">XMPP Standards Foundation</link> (XSF).</copyright>
<permissions>Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.</permissions>
<warranty>## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##</warranty>
<liability>In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.</liability>
<conformance>This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at &lt;<link url="https://xmpp.org/about/xsf/ipr-policy">https://xmpp.org/about/xsf/ipr-policy</link>&gt; or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).</conformance>
</legal>
  <number>0088</number>
  <status>Deferred</status>
  <type>Informational</type>
  <sig>Standards</sig>
  <dependencies>
    <spec>XMPP Core</spec>
    <spec>XEP-0030</spec>
    <spec>XEP-0049</spec>
  </dependencies>
  <supersedes/>
  <supersededby/>
  <shortname>webtab</shortname>
  <author>
    <firstname>Richard</firstname>
    <surname>Dobson</surname>
    <email>richard@dobson-i.net</email>
    <jid>richard@dobson-i.net</jid>
  </author>
  <revision>
    <version>0.4</version>
    <date>2004-03-14</date>
    <initials>red</initials>
    <remark>Added Terminology section and associated alterations and added clarification about what the webtabs are.</remark>
  </revision>
  <revision>
    <version>0.3</version>
    <date>2003-09-30</date>
    <initials>red</initials>
    <remark>Moved service discovery to top of use cases, added option for separate webtab provider and added reference to XEP-0101.</remark>
  </revision>
  <revision>
    <version>0.2</version>
    <date>2003-05-16</date>
    <initials>red</initials>
    <remark>Clean ups.</remark>
  </revision>
  <revision>
    <version>0.1</version>
    <date>2003-03-02</date>
    <initials>red</initials>
    <remark>Initial version.</remark>
  </revision>
</header>
<section1 topic="Introduction">
  <p>Webtabs are a way for servers to specify a number to web pages which can be used in clients and displayed like the web-based services in Yahoo Messenger, MSN Messenger and JIM. This enables a server administrator to easily create services for Jabber clients and also help to integrate Jabber clients with existing web-based applications.</p>
</section1>
<section1 topic="Requirements">
  <p>The motivations for this document are:</p>
  <ul>
    <li>To enable servers to specify a selection of web-based services for use in a client.</li>
    <li>To allow easy integration with existing web-based systems.</li>
    <li>To give more value to people's Jabber services over another's.</li>
    <li>To allow the creation of virtually limitless web-based services for Jabber clients without clients needing to be specifically coded to support that service.</li>
  </ul>
</section1>
<section1 topic="Use Cases">
  <section2 topic="Service Discovery">
  <p><span class="ref"><link url="https://xmpp.org/extensions/xep-0030.html">Service Discovery (XEP-0030)</link></span> <note>XEP-0030: Service Discovery &lt;<link url="https://xmpp.org/extensions/xep-0030.html">https://xmpp.org/extensions/xep-0030.html</link>&gt;.</note> SHALL be used for discovering support for webtabs on servers.</p>
    <example caption="Disco info response containing support for webtabs"><![CDATA[
<iq
    type='result'
    from='domain.com'
    to='user@domain/resource'
    id='disco1'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    <feature var='http://jabber.org/protocol/webtab'/>
  </query>
</iq>]]></example>
  <p>It is RECOMMENDED that the jabber server itself (JSM in jabberd) serves the webtab list, but if desired by the server implementor they MAY be served by a separate host/component.</p>
    <example caption="Separate webtab host specified by server"><![CDATA[
<iq
    type='result'
    from='domain.com'
    to='user@domain/resource'
    id='disco1'>
  <query xmlns='http://jabber.org/protocol/disco#items'>
    <item
        jid='webtabs.domain.com'
        name='Webtab Provider'/>
  </query>
</iq>

<iq
    type='result'
    from='webtabs.domain.com'
    to='user@domain/resource'
    id='disco1'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    <feature var='http://jabber.org/protocol/webtab'/>
  </query>
</iq>]]></example>
  </section2>
  <section2 topic="Retrieving list of web tabs">
  <p>The list of available web tabs is retrieved using the following protocol:</p>
    <example caption="Request for list of webtabs available on a server"><![CDATA[
<iq
    to='domain.com'
    type='get'
    id='webtab1'>
  <query xmlns='http://jabber.org/protocol/webtab'/>
</iq>]]></example>
    <example caption="Response from server listing the available webtabs"><![CDATA[
<iq
    to='user@domain.com/resource'
    from='domain.com'
    type='result'
    id='webtab1'>
  <query xmlns='http://jabber.org/protocol/webtab'>
    <webtab type='email' id='em' name='Webmail'>
        http://tab.server.com/mail/
    </webtab>
    <webtab type='bookmark' id='bk' name='Bookmarks'>
        http://webtab.bookmarks.example.com/
    </webtab>
    <webtab type='calendar' id='cal' name='Calendar'>
        http://calendar.example.com/webtab/
    </webtab>
    <webtab type='news' id='nws' name='BBC News'>
        http://news.bbc.co.uk/webtab/
    </webtab>
  </query>
</iq>]]></example>
<p>The webtab contains CDATA which is the URL of the webtab, the webtab is an HTML page retrieved from an HTTP server using a standard browser which you embed into your client UI using a technique such as the IWebBrowser2 control interface on windows which allows you to embed either the IE or Gecko engines depending on what you have installed, this data is REQUIRED.</p>
<p>The "type" attribute tells the client what the service being provided is, this allows a client to display icons on the tabs to represent them, handling of the type in clients is OPTIONAL, inclusion of this attribute is REQUIRED (See "XMPP Registrar Considerations" for examples of values for this attribute).</p>
<p>The "name" attribute is the offical name of a particular service this can be displayed as the tab name, this attribute is REQUIRED.</p>
<p>The "id" attribute is a unique identifier for a service which you can use to refer to it later, used for when using private storage to store a preference to which tabs should be visible, this attribute is REQUIRED.</p>
  </section2>
  <section2 topic="Private storage of preferences">
  <p><span class="ref"><link url="https://xmpp.org/extensions/xep-0049.html">Private XML Storage (XEP-0049)</link></span> <note>XEP-0049: Private XML Storage &lt;<link url="https://xmpp.org/extensions/xep-0049.html">https://xmpp.org/extensions/xep-0049.html</link>&gt;.</note> SHALL be used for storing webtab preferences.</p>
    <example caption="Request for current webtab preferences"><![CDATA[
<iq
    to='domain.com'
    type='get'
    id='prefs1'>
  <query xmlns='jabber:iq:private'>
    <prefs xmlns="webtab:prefs"/>
  </query>
</iq>]]></example>
    <example caption="Response with webtab preferences"><![CDATA[
<iq
    to='user@domain.com/resource'
    from='domain.com'
    type='result'
    id='prefs1'>
  <query xmlns='jabber:iq:private'>
    <prefs xmlns='webtab:prefs'>
      <webtab id='em' visible='true'/>
      <webtab id='bk' visible='false'/>
      <webtab id='cal' visible='true'/>
    </prefs>
  </query>
</iq>]]></example>
<p>The "id" attribute matches the "id" attribute from the list of webtabs, this attribute is used to match these preferences to the webtab in question, this attribute is REQUIRED.</p>
<p>The "visible" attribute tells the client that a tab SHOULD or SHOULD NOT be hidden, a client SHOULD provide an interface for managing the visibility of the tabs and updating the preferences appropriately, this attribute is REQUIRED.</p>
  </section2>
  <section2 topic="Service authentication">
    <p>It is RECOMMENDED that a mechanism such as <span class="ref"><link url="https://xmpp.org/extensions/xep-0101.html">HTTP Authentication using Jabber Tickets (XEP-0101)</link></span> <note>XEP-0101: HTTP Authentication using Jabber Tickets &lt;<link url="https://xmpp.org/extensions/xep-0101.html">https://xmpp.org/extensions/xep-0101.html</link>&gt;.</note> be used for automatic service authentication.</p>
  </section2>

</section1>
<section1 topic="Implementation Notes">
  <p>The following guidelines may assist client developers.</p>
  <ul>
    <li>Use the "type" attribute as a way of determining what services a webtab provides, you can then use this to possibly display appropriate icons to represent the webtab in the client UI.</li>
    <li>MUST use the "name" attribute when you have to refer to a webtab by name.</li>
    <li>MUST use the private storage specification provided to store information about which tabs SHOULD be visible.</li>
  </ul>
</section1>
<section1 topic="Security Considerations">
  <p>It is recommended that XEP-0101 be used to provide transparent authentication of the webtabs.</p>
</section1>
<section1 topic="IANA Considerations">
  <p>No IANA interaction required.</p>
</section1>
<section1 topic="XMPP Registrar Considerations" anchor="registrar">
  <p>The <span class="ref"><link url="https://xmpp.org/registrar/">XMPP Registrar</link></span> <note>The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see &lt;<link url="https://xmpp.org/registrar/">https://xmpp.org/registrar/</link>&gt;.</note> will need to register the new namespace of "http://jabber.org/protocol/webtab" and possibly the list of offical types will need to be managed too.</p>
  <table caption="Possible types for webtabs">
    <tr>
      <th>Type</th>
      <th>Purpose</th>
    </tr>
    <tr>
      <td>email</td>
      <td>Web based email</td>
    </tr>
    <tr>
      <td>calendar</td>
      <td>Web based calendar</td>
    </tr>
    <tr>
      <td>bookmark</td>
      <td>Web based bookmark management service</td>
    </tr>
    <tr>
      <td>news</td>
      <td>General news headlines</td>
    </tr>
    <tr>
      <td>news/sport</td>
      <td>Sport headlines</td>
    </tr>
  </table>
</section1>
</xep>
