Advanced | Help | Encyclopedia
Directory


Query string

A query string is the part of a URL that conveys parametric data to the server.

Table of contents

Syntax

The basic syntax is ?parameter1=value1&parameter2=value2 . . .

  • The query string starts with a question mark.
  • Then follows a series of parameter=value pairs. For example, Message=hello.
  • The parameter-value pairs are each separated by an equal sign.
  • The series of pairs is separated by the ampersand, '&'. (The W3C recommends supporting ";" in place of "&". [1])


URL Encoding

Spaces, ampersands, equal signs, and many other characters could cause trouble with the URL and the query string. Therefore the value in each parameter-value pair is URL-Encoded. This is a process by which each of these troublesome characters is converted into a numeric represenctation.

'%2D' is one such example.

  • The percent sign signals the start of such a string.
  • '2D' is the number 45 in HEX  – in ASCII and UNICODE, each character has a numerical index.

Therefore, %2D is the minus sign, and %25 is the percent character.

Quirks

  • Spaces are converted to plus signs, e.g. "hello there" would be converted to hello+there.

See also

Email Attachments

External links

  • online encoders and decoders for educational purposes

[2]








Links: Addme | Keyword Research | Paid Inclusion | Femail | Software | Completive Intelligence

Add URL | About Slider | FREE Slider Toolbar - Simply Amazing
Copyright © 2000-2008 Slider.com. All rights reserved.
Content is distributed under the GNU Free Documentation License.