Location Component

The dcc.Location component represents the location or address bar in your web
browser. Through its href, pathname, search and hash properties
you can access different portions of the url that the app is loaded on.

See the URLs & Multipage Apps chapter
for more details.

For example, given the url http://127.0.0.1:8050/page-2?a=test#quiz:

  • href = "http://127.0.0.1:8050/page-2?a=test#quiz"
  • pathname = "/page-2"
  • search = "?a=test"
  • hash = "#quiz"

Access this documentation in your Python terminal with:
```python

help(dash_core_components.Location)
```

id (string; required): The ID of this component, used to identify dash components in callbacks. The ID needs to be unique across all of the components in an app.

hash (string; optional): hash in window.location - e.g., “#myhash”

href (string; optional): href in window.location - e.g., “/my/full/pathname?myargument=1#myhash”

pathname (string; optional): pathname in window.location - e.g., “/my/full/pathname”

refresh (boolean; default True): Refresh the page when the location is updated?

search (string; optional): search in window.location - e.g., “?myargument=1”