Monday, March 30, 2009

Using the fragment identifier

A fragment identifier is defined by RFC 3986 as an optional component of a URI reference, and it must conform to a certain syntax. The syntax requires that the fragment identifier be separated from the rest of the URI reference by a # (number sign) character. The separator is not considered part of the fragment identifier.

Basically it looks like http://www.foo.org/foo.html#fragment-identifier.

To use it in Javascript, it is simply "window.location.hash"

0 comments: