# Location : Object
Return to: HTML DOM Level 0 index

URL of the window.

## Platform Support

IE | Mozilla | Netscape | Opera | Safari
--- | --- | --- | --- | ---
3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+

## Constructors

Constructor | Action | IE | Mozilla | Netscape | Opera | Safari
--- | --- | --- | --- | --- | --- | ---
Location Constructor() : Location Creates a new instance of a Location object. | Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+

### Location() : Location

Creates a new instance of a Location object.

Returns

Location |

Visibility
  internal

## Properties

Property | Action | IE | Mozilla | Netscape | Opera | Safari
--- | --- | --- | --- | --- | --- | ---
hash : String Anchor portion of the URL. | No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+

host : String Host name and port of the URL. | No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+

hostname : String Host name of the URL. | No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+

href : String Complete text of the URL. | No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+

pathname : String Path name portion of the URL. (e.g. "/docs/index.html") | No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+

port : String Port portion of the URL. | No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+

protocol : String Protocol portion of the URL. ("http" or "https") | No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+

search : String Query string portion of the URL. | No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+

## Functions

Method | Action | IE | Mozilla | Netscape | Opera | Safari
--- | --- | --- | --- | --- | --- | ---
reload(Boolean force) : Object Reloads the current URL. | Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+

Parameters

Boolean | force | Specify true to reload the document from the server even if it has not been modified since it was last loaded.

Returns

Object |

Availability

  JavaScript 1.1

replace(String url) : Object Replace the document of the current URL with the document from another URL. | Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+

Parameters

String | url | URL to replace the current document with.

Returns

Object |

See Also

  History

Availability

  JavaScript 1.1

## References

Link|Window.location

## Availability

JavaScript 1.0|enhanced in JavaScript 1.1

text_javascript aptana_docs