]> W3A/A -- WWW Applets/Agents API

W3A/A: Agents

Agents are used to add new protocols to a browser. They are characterized by

  1. one or more protocols (possibly given as a regular expression matching a URL, such as "wais:*" or "new-proto:*").

  2. the object file(s) to load (could be a list of object files or the name of a library).

  3. a suffix, that is used to distinguish function names in this agent from functions in all other applets.

Agents are responsible for determining the (MIME) type of a document and also for decoding of compressed or otherwise encoded documents. In some case that may even entail using heuristic rules to guess the type (e.g., in case of the FTP protocol).

Agents are also responsible for authentication, encryption and decryption for protocols that require it.

Question: This is a difficult area, since it may involve user interaction, which is normally not a task for an agent. How can the user interface be decoupled from such an agent?

All agents must define (and export) the following functions:

The browser uses these functions subject to the obvious constraints: initXXX must be called exactly once, prior to the first call to openXXX. The functions readXXX, writeXXX, peekXXX, doneXXX and infoXXX can only be called with an object that is returned by openXXX. After a call to closeXXX no further calls to any of the others are possible for the same object.

Question: How about URNs? I guess resolving URNs to URLs will be an (exported) function of the browser. See W3AresolveURN().