Ford & Mason Ltd
HOME
ABOUT
CONTACT
RESOURCES
ADVERTISING



donations support the development of
cronolog.org
and
refcards.com

next up previous contents index
Next: URL-encoding Up: Naming schemes on Previous: Naming schemes on


Syntax of URLs

This section describes the syntax of URLs in detail. You may want to skip straight to Section gif on an initial reading.

The general syntax of a URL is:

    scheme:path

The scheme identifies the protocol, such as HTTP, Gopher, FTP, and so on, that the browser should use to access the resource. The interpretation of path depends on the protocol being used. For many protocols path is taken to be a hierarchical name including a host name and optional port number. Host names are preceded by a double slash (//). Case may or may not be significant within the path, depending on the operating system on which the server is running. Port numbers are numeric identifiers that specify which server program on the server machine is addressed. These are standardized for standard protocols: Gopher uses port 70, HTTP uses 80, and so on, and where the standard port is used it need not be explicitly stated in the URL.

The path may be followed by a query string or a fragment identifier.

Query strings can be phrases used to locate indexed documents. They are also sometimes used to pass coordinate data from image maps and user input from forms to a server. They are indicated by a question mark (?) following the path. Within a query string spaces may be replaced by plus signs (+), which means that real plus signs must be encoded.

Fragment identifiers are indicated by a hash sign (#) followed by a name at the end of the URL. They are interpreted by the browser as the address of locations within a resource, and are not actually passed to the server.

Partial URLs can occur in documents. These are interpreted by the browser as being relative to the URL of the current document, using rules similar to those used to resolve filenames on the UNIX system. The strings .. and . are taken to mean the next level up and the current level respectively.

 



next up previous contents index
Next: URL-encoding Up: Naming schemes on Previous: Naming schemes on

[ITCP]Spinning the Web by Andrew Ford
© 1995 International Thomson Publishing
© 2002 Andrew Ford and Ford & Mason Ltd
Note: this HTML document was generated in December 1994 directly from the LaTeX source files using LaTeX2HTML. It was formatted into our standard page layout using the Template Toolkit. The document is mainly of historical interest as obviously many of the sites mentioned have long since disappeared.

 
Copyright © 1996-2002 Ford & Mason Ltd