Simple keyword searches. The browser should provide a single line text input field for entering a query string.
The semantics for ISINDEX are defined only when the base URL for the enclosing document is an HTTP URL. Typically, when the user presses the enter (return) key, the query string is sent to the server identified by the base URL for this document. For example, if the query string entered is "ten green apples" and the base URL is:
http://www.acme.com/
then the query generated is:
http://www.acme.com/?ten+green+apples"The ISINDEX element only provides an interface to a program (typically, a CGI script) which interprets the query. Merely inserting an ISINDEX element does not make the document searchable! (On the other hand, notice that most Web browsers provide some "search in this document" feature, so you need not take any special efforts in order to allow your readers perform simple searches within a single document.)
attribute name | possible values | meaning |
---|---|---|
PROMPT | string | prompt message |
The PROMPT attribute can be used to specify a prompt string for the input field, replacing a browser-dependent default prompt string (which might be e.g. This is a searchable index. Enter search keywords).
Searching... <ISINDEX PROMPT="Search string:">
By HTML specifications, there are no restrictions on the number of characters that can be entered in the query string. In practice, limits like 2,048 characters have been reported.
In practice, the query string is restricted to Latin-1 as there is no current mechanism for the URL to specify a character set for the query.
When the query is generated from the input, space characters are mapped to "+" characters, and normal URL character escaping mechanisms apply. For further details see the HTTP specification.